public JsonResult Save(CompanyViewModel input)
 {
     var item = input.EntityId > 0 ? _repository.Find<Company>(input.EntityId) : new Company();
     mapItem(ref item, input);
     var crudManger = _saveEntityService.ProcessSave(item);
     var notification = crudManger.Finish();
     return Json(notification);
 }
 public ActionResult AddUpdate(ViewModel input)
 {
     Company item = input.EntityId > 0 ? _repository.Find<Company>(input.EntityId) : new Company();
     var model = new CompanyViewModel{
         Company = item,
         _Title = WebLocalizationKeys.CLIENT.ToString(),
     };
     return View(model);
 }
 private void mapItem(ref Company original, CompanyViewModel input)
 {
     original.Name = input.Company.Name;
 }