public ActionResult SubmitForm(TLedControllerModel model)
 {
     if (model.ID == -1)
     {
         this.bll.Insert(model);
     }
     else
     {
         this.bll.Update(model);
     }
     return(Content("操作成功!"));
 }
        public ActionResult Form(int id)
        {
            var model = this.bll.GetModel(id);

            if (model == null)
            {
                model = new TLedControllerModel()
                {
                    ID = -1
                }
            }
            ;
            return(View(model));
        }
Exemplo n.º 3
0
 public int Delete(TLedControllerModel model)
 {
     return(this.dal.Delete(model));
 }
Exemplo n.º 4
0
 public int Update(TLedControllerModel model)
 {
     return(this.dal.Update(model));
 }
Exemplo n.º 5
0
 public TLedControllerModel Insert(TLedControllerModel model)
 {
     return(this.dal.Insert(model));
 }
Exemplo n.º 6
0
 public TLedControllerModel Insert(TLedControllerModel model)
 {
     return(db.Insert(model));
 }