Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "RuleId,RegularExpression,RegExGroup,Query,RuleStatus,LastUpdateUser")] Data.Rule rule)
 {
     if (ModelState.IsValid)
     {
         service.Update(rule);
         return(RedirectToAction("Index"));
     }
     return(View(rule));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "RuleStatus")] Data.Rule rule)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rule).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(rule));
 }
Ejemplo n.º 3
0
 // GET: Approver/Edit/5
 public ActionResult Edit(int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     Data.Rule rule = db.Rules.Find(id);
     if (rule == null)
     {
         return(HttpNotFound());
     }
     return(View(rule));
 }
Ejemplo n.º 4
0
        // GET: Editor/Delete/5

        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Data.Rule rule = service.GetRuleById((int)id);
            if (rule == null)
            {
                return(HttpNotFound());
            }
            return(View(rule));
        }
Ejemplo n.º 5
0
 /// <summary>
 /// 收到更新规则
 /// </summary>
 /// <param name="userName">用户名</param>
 /// <param name="dataType">数据类型</param>
 /// <param name="data">规则数据</param>
 private void RecvUpdateRule(string userName, int dataType, Data.Rule data)
 {
 }
Ejemplo n.º 6
0
 public ActionResult DeleteConfirmed(int id)
 {
     Data.Rule rule = service.GetRuleById(id);
     service.Delete(rule);
     return(RedirectToAction("Index"));
 }