public ActionResult DetailNCC(DGNCCModel model) { bool status; status = new DeXuatNCCDao().SaveNCC(model); return(Json(status, JsonRequestBehavior.AllowGet)); }
public bool UpdateNCC(DGNCCModel m) { try { tbl = db.tbl_DG_NCC.Find(m.Id); tbl.Ma_NCC = m.Ma_NCC; db.SaveChanges(); return(true); } catch { return(false); } }
public bool SaveNCC(DGNCCModel m) { try { tbl.DeXuatId = m.DeXuatId; tbl.Ma_NCC = m.Ma_NCC; db.tbl_DG_NCC.Add(tbl); db.SaveChanges(); return(true); } catch { return(false); } }