public ActionResult EditGroup(SalesGroupViewModel model) { SalesGroupDAL sgdal = new SalesGroupDAL(); sgdal.Update(model.CastDB(model)); sgdal.AcceptAllChange(); return(GetBaseResponse <DistrictViewModel>(true)); }
public ActionResult DeleteGroup(string id) { SalesGroupDAL sgdal = new SalesGroupDAL(); var model = sgdal.Get(id); sgdal.Delete(model); sgdal.AcceptAllChange(); return(GetBaseResponse <DistrictViewModel>(true)); }
public ActionResult CreateGroup(SalesGroupViewModel model) { SalesGroupDAL sgdal = new SalesGroupDAL(); model.ID = Guid.NewGuid().ToString(); sgdal.Add(model.CastDB(model)); sgdal.AcceptAllChange(); return(GetBaseResponse <DistrictViewModel>(true)); }