Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         RuleManager RM   = new RuleManager();
         RuleTBx     rule = new RuleTBx();
         int         id   = Convert.ToInt32(Request["id"]);
         rule             = RM.GetByID(id);
         rule.name        = Request["name"];
         rule.description = Request.Unvalidated["check"];
         rule.content     = Request.Unvalidated["contrule"];
         rule.point       = Request["point"];
         rule.task_id     = Convert.ToInt32(Request["task"]);
         rule.step        = Request["step"];
         RM.Save();
         Response.Write(JsonConvert.SerializeObject(new
         {
             success = 1
         }));
     }
     catch (Exception ex)
     {
         Response.Write(JsonConvert.SerializeObject(new
         {
             success = -1,
             error   = ex
         }));
     }
 }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        RuleManager RM = new RuleManager();

        rule = RM.GetByID(Convert.ToInt32(Request.QueryString["id"]));
        TaskManager TM = new TaskManager();

        listtask = TM.GetList();
    }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         RuleManager RM   = new RuleManager();
         RuleTBx     rule = new RuleTBx();
         int         id   = Convert.ToInt32(Request["id"]);
         rule        = RM.GetByID(id);
         rule.status = -1;
         RM.Save();
         Response.Write(JsonConvert.SerializeObject(new
         {
             success = 1
         }));
     }
     catch (Exception ex)
     {
         Response.Write(JsonConvert.SerializeObject(new
         {
             success = -1,
             error   = ex
         }));
     }
 }