Example #1
0
        public ActionResult EditDistrict(DistrictViewModel model)
        {
            DistrictDAL sgdal = new DistrictDAL();

            sgdal.Update(model.CastDB(model));
            sgdal.AcceptAllChange();
            return(GetBaseResponse <DistrictViewModel>(true));
        }
Example #2
0
        public ActionResult CreateDistrict(DistrictViewModel model)
        {
            DistrictDAL sgdal = new DistrictDAL();

            model.ID = Guid.NewGuid().ToString();
            sgdal.Add(model.CastDB(model));
            sgdal.AcceptAllChange();
            return(GetBaseResponse <DistrictViewModel>(true));
        }