public ActionResult Update(CustomerCustomerDemoItemModel customerCustomerDemoItemModel) { try { if (IsUpdate(customerCustomerDemoItemModel.OperationResult)) { if (IsValid(customerCustomerDemoItemModel.OperationResult, customerCustomerDemoItemModel.CustomerCustomerDemo)) { CustomerCustomerDemo customerCustomerDemo = (CustomerCustomerDemo)customerCustomerDemoItemModel.CustomerCustomerDemo.ToData(); if (Application.Update(customerCustomerDemoItemModel.OperationResult, customerCustomerDemo)) { if (customerCustomerDemoItemModel.IsSave) { return(JsonResultSuccess(customerCustomerDemoItemModel.OperationResult, Url.Action("Update", "CustomerCustomerDemo", new { CustomerId = customerCustomerDemo.CustomerId, CustomerTypeId = customerCustomerDemo.CustomerTypeId }, Request.Url.Scheme))); } else { return(JsonResultSuccess(customerCustomerDemoItemModel.OperationResult)); } } } } } catch (Exception exception) { customerCustomerDemoItemModel.OperationResult.ParseException(exception); } customerCustomerDemoItemModel.ActivityOperations = ActivityOperations; return(JsonResultOperationResult(customerCustomerDemoItemModel.OperationResult)); }
public ActionResult Delete(string customerId, string customerTypeId, string masterCustomerTypeId = null, string masterCustomerId = null) { CustomerCustomerDemoItemModel customerCustomerDemoItemModel = new CustomerCustomerDemoItemModel() { IsSecurityOperations = this.IsSecurityOperations, CustomerCustomerDemo = new CustomerCustomerDemoViewModel(), ControllerAction = "Delete", MasterCustomerTypeId = masterCustomerTypeId, MasterCustomerId = masterCustomerId }; try { CustomerCustomerDemoDTO customerCustomerDemoDTO = Application.GetById(customerCustomerDemoItemModel.OperationResult, new object[] { customerId, customerTypeId }); if (customerCustomerDemoDTO != null) { customerCustomerDemoItemModel.CustomerCustomerDemo = new CustomerCustomerDemoViewModel(customerCustomerDemoDTO); } } catch (Exception exception) { customerCustomerDemoItemModel.OperationResult.ParseException(exception); } return(PartialView(customerCustomerDemoItemModel)); }
public ActionResult Delete(CustomerCustomerDemoItemModel customerCustomerDemoItemModel) { try { if (Application.Delete(customerCustomerDemoItemModel.OperationResult, (CustomerCustomerDemoDTO)customerCustomerDemoItemModel.CustomerCustomerDemo.ToDTO())) { return(JsonResultSuccess(new { uri = ReadUrlDictionary() })); } } catch (Exception exception) { customerCustomerDemoItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(customerCustomerDemoItemModel.OperationResult)); }
public ActionResult Create(string masterEntity = null, string masterKey = null) { CustomerCustomerDemoItemModel customerCustomerDemoItemModel = new CustomerCustomerDemoItemModel(ActivityOperations, "Create", masterEntity, masterKey); try { if (IsCreate(customerCustomerDemoItemModel.OperationResult)) { return(ZPartialView("CRUD", customerCustomerDemoItemModel)); } } catch (Exception exception) { customerCustomerDemoItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(customerCustomerDemoItemModel.OperationResult)); }
public ActionResult Delete(CustomerCustomerDemoItemModel customerCustomerDemoItemModel) { try { if (IsDelete(customerCustomerDemoItemModel.OperationResult)) { if (Application.Delete(customerCustomerDemoItemModel.OperationResult, (CustomerCustomerDemo)customerCustomerDemoItemModel.CustomerCustomerDemo.ToData())) { return(JsonResultSuccess(customerCustomerDemoItemModel.OperationResult)); } } } catch (Exception exception) { customerCustomerDemoItemModel.OperationResult.ParseException(exception); } customerCustomerDemoItemModel.ActivityOperations = ActivityOperations; return(JsonResultOperationResult(customerCustomerDemoItemModel.OperationResult)); }
public ActionResult Create(string masterCustomerTypeId = null, string masterCustomerId = null) { CustomerCustomerDemoItemModel customerCustomerDemoItemModel = new CustomerCustomerDemoItemModel() { IsSecurityOperations = this.IsSecurityOperations, CustomerCustomerDemo = new CustomerCustomerDemoViewModel(), ControllerAction = "Create", MasterCustomerTypeId = masterCustomerTypeId, MasterCustomerId = masterCustomerId }; try { IsCreate(customerCustomerDemoItemModel.OperationResult); } catch (Exception exception) { customerCustomerDemoItemModel.OperationResult.ParseException(exception); } return(PartialView(customerCustomerDemoItemModel)); }
public ActionResult Delete(string customerId, string customerTypeId, string masterEntity = null, string masterKey = null) { CustomerCustomerDemoItemModel customerCustomerDemoItemModel = new CustomerCustomerDemoItemModel(ActivityOperations, "Delete", masterEntity, masterKey); try { if (IsDelete(customerCustomerDemoItemModel.OperationResult)) { CustomerCustomerDemo customerCustomerDemo = Application.GetById(customerCustomerDemoItemModel.OperationResult, new object[] { customerId, customerTypeId }); if (customerCustomerDemo != null) { customerCustomerDemoItemModel.CustomerCustomerDemo = new CustomerCustomerDemoViewModel(customerCustomerDemo); return(ZPartialView("CRUD", customerCustomerDemoItemModel)); } } } catch (Exception exception) { customerCustomerDemoItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(customerCustomerDemoItemModel.OperationResult)); }