什么是我最好的解决方案 [英] Whats my best solution

查看:78
本文介绍了什么是我最好的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正忙着写一个C#winform应用程序。我对这个想法很陌生,并且怀疑我需要使用规则引擎或工作流程,但只是不确定如何实现这个。



我有一个带有表的SQL数据库让我们说STATUS:New,In Progress,Complete

然后我有一个用户表USERS:JOHNDOE



所以我想设置逻辑如:IF FIELD STATUS = New THEN FIELD USER = JOHNDOE



编辑:



我正在研究一个迷你CRM系统,在系统内我可以获得投诉。因此,假设在投诉中有一个名为Status的字段和一个名为User的字段。所以我想要的是,如果投诉的状态是新,那么它会触发一些事情(工作流程不确定该怎么称呼它)然后会改变用户说John Doe。这可以适用于任何领域,因此您可以根据需要构建这些规则。



我希望现在更清楚。



有没有解决方案,或者我需要构建一些东西。

I am busy writing a C# winform application. I am new to this idea that I have and suspect I would need to use a rules engine or workflow for this but just not sure how to achieve this.

I have a SQL database with a table lets say STATUS: New, In Progress, Complete
I then have a user table USERS: JOHNDOE

So I would like to setup logic like: IF FIELD STATUS = New THEN FIELD USER = JOHNDOE

edit:

I am working on a mini CRM system, within the system I would have a place to to capture a complaint. So lets say on complaint has a field called Status and a Field called User. So what I would like is if the status of a complaint is say "New" then it would trigger something (workflow not sure what to call it) that would then change the User to say John Doe. This could be for any field so you could build these rules as you need them.

I hope that is more clear now.

Is there a solution for this or am I going to need to build something.

推荐答案

你所谈论的大部分内容应该发生在数据库中使用存储过程和触发器。



这样,你就可以在一个地方评估规则(插入,更新,删除等),而不是在使用多个松散连接的WinForms客户端时。你真的应该尽可能多地保留UI的规则逻辑,并将它保存在服务器端的一个位置。
Most of what you are talking about should take place in the database using stored procedures and triggers.

This way, you have a single place where the rules are evaluated (on insert, update, delete, etc) and not when using multiple loosely connected WinForms clients. You really should keep as much rules logic out of the UI as possible and keep it on the server side in a single location.


这篇关于什么是我最好的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆