//Thêm group public void AddGroup(TBL_GROUP model) { model.ACTIVATE = true; context.TBL_GROUPs.Add(model); context.SaveChanges(); }
public bool Delete(int maNhom) { TBL_GROUP groupExist = context.TBL_GROUPs.Find(maNhom); if (groupExist == null) { return(false); } context.TBL_GROUPs.Remove(groupExist); context.SaveChanges(); return(true); }
public ActionResult AddGroup(TBL_GROUP collection) { try { // TODO: Add insert logic here if (ModelState.IsValid) { PNService.AddGroup(collection); return(Json("Thêm thành công")); } return(Json("Thêm thất bại")); } catch (Exception ex) { string er = ex.Message; return(Json(er)); } }