示例#1
0
 public void Create(Zone zone)
 {
     _repository.Insert(zone);
 }
示例#2
0
 public void Delete(Zone t)
 {
     _repository.Delete(t);
 }
示例#3
0
 public ActionResult ZoneCreate(ZoneViewModel model)
 {
     if (ModelState.IsValid)
     {
         var mo = new Zone()
             {
                 Name = model.Name,
             };
         _stagedZoneService.Delete(model.Id);
         _zoneService.Create(mo);
         this.AccessContext.FlushChanges();
         mo.UniqueId = "Z" + mo.Id;
         return Json(new {});
     }
     ModelState.AddModelError("", "There are validation Errors");
     return PartialView(model);
 }