public ActionResult Edit(int Id) { var entity = standingDataService.GetDataById(Id); StandingDataModel model = new StandingDataModel(); ModelCopier.CopyModel(entity, model); return(PartialView("Create", model)); }
public ActionResult Create() { StandingDataModel up = new StandingDataModel(); up.IsActive = true; int id = (int)SessionHelper.Temp; if (id == 1) { up.Type = "SRC"; } return(PartialView(up)); }
public ActionResult Save(StandingDataModel model) { StandingData entity = new StandingData(); ModelCopier.CopyModel(model, entity); if (model.Id == 0) { standingDataService.Add(entity); } else { standingDataService.Update(entity); } unitOfWork.Commit(); return(PartialView()); }