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)); }
public int Delete(TLedControllerModel model) { return(this.dal.Delete(model)); }
public int Update(TLedControllerModel model) { return(this.dal.Update(model)); }
public TLedControllerModel Insert(TLedControllerModel model) { return(this.dal.Insert(model)); }
public TLedControllerModel Insert(TLedControllerModel model) { return(db.Insert(model)); }