예제 #1
0
 public bool UpdateRuleContentByID(MRule objrules)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("update tb_rule set content=@RuleContent where id=@ID");
     OleDbParameter[] param = {
                                OleDbHelper.GetParameter("@RuleContent",OleDbType.LongVarWChar,"content",objrules.RuleContent),
                                OleDbHelper.GetParameter("@ID",OleDbType.Integer,4,"id",objrules.ID)
                            };
     bool is_succeed = OleDbHelper.ExecuteSql(sb.ToString(), param);
     if (is_succeed)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
예제 #2
0
 public bool InsertIntoRule(MRule objrules)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("insert into tb_rule (id,content) values(@ID,@RuleContent)");
     OleDbParameter[] param = {
                                OleDbHelper.GetParameter("@ID",OleDbType.Integer,4,"id",objrules.ID),
                                OleDbHelper.GetParameter("@RuleContent",OleDbType.LongVarWChar,"content",objrules.RuleContent)
                            };
     bool is_succeed = OleDbHelper.ExecuteSql(sb.ToString(), param);
     if (is_succeed)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
예제 #3
0
 public bool UpdateRuleContentByID(MRule objrules)
 {
     return rules.UpdateRuleContentByID(objrules);
 }
예제 #4
0
 public bool InsertIntoRule(MRule objrules)
 {
     return rules.InsertIntoRule(objrules);
 }