Exemple #1
0
        public ActionResult EditGroup(SalesGroupViewModel model)
        {
            SalesGroupDAL sgdal = new SalesGroupDAL();

            sgdal.Update(model.CastDB(model));
            sgdal.AcceptAllChange();
            return(GetBaseResponse <DistrictViewModel>(true));
        }
Exemple #2
0
        public ActionResult DeleteGroup(string id)
        {
            SalesGroupDAL sgdal = new SalesGroupDAL();
            var           model = sgdal.Get(id);

            sgdal.Delete(model);
            sgdal.AcceptAllChange();
            return(GetBaseResponse <DistrictViewModel>(true));
        }
Exemple #3
0
        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));
        }