public ActionResult Update(AuditTrailLogItemModel auditTrailLogItemModel) { try { if (IsUpdate(auditTrailLogItemModel.OperationResult)) { if (IsValid(auditTrailLogItemModel.OperationResult, auditTrailLogItemModel.AuditTrailLog)) { AuditTrailLog auditTrailLog = (AuditTrailLog)auditTrailLogItemModel.AuditTrailLog.ToData(); if (Application.Update(auditTrailLogItemModel.OperationResult, auditTrailLog)) { if (auditTrailLogItemModel.IsSave) { return(JsonResultSuccess(auditTrailLogItemModel.OperationResult, Url.Action("Update", "AuditTrailLog", new { Id = auditTrailLog.Id }, Request.Url.Scheme))); } else { return(JsonResultSuccess(auditTrailLogItemModel.OperationResult)); } } } } } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } auditTrailLogItemModel.ActivityOperations = ActivityOperations; return(JsonResultOperationResult(auditTrailLogItemModel.OperationResult)); }
public ActionResult Delete(int?auditTrailLogId) { AuditTrailLogItemModel auditTrailLogItemModel = new AuditTrailLogItemModel() { IsSecurityOperations = this.IsSecurityOperations, AuditTrailLog = new AuditTrailLogViewModel(), ControllerAction = "Delete" }; try { if (IsDelete(auditTrailLogItemModel.OperationResult)) { AuditTrailLog auditTrailLog = Repository.GetById(new object[] { auditTrailLogId }); if (auditTrailLog != null) { auditTrailLogItemModel.AuditTrailLog = new AuditTrailLogViewModel(auditTrailLog); } } } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } return(PartialView(auditTrailLogItemModel)); }
public ActionResult Update(AuditTrailLogItemModel auditTrailLogItemModel) { try { if (IsUpdate(auditTrailLogItemModel.OperationResult)) { if (ValidateModelState(Repository)) { if (Repository.Update(auditTrailLogItemModel.OperationResult, (AuditTrailLog)auditTrailLogItemModel.AuditTrailLog.ToData())) { if (UnitOfWork.Save(auditTrailLogItemModel.OperationResult)) { return(JsonResultSuccess(new { uri = ReadUrlDictionary() })); } } } } } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(auditTrailLogItemModel.OperationResult)); }
public ActionResult Update(AuditTrailLogItemModel auditTrailLogItemModel) { try { if (IsUpdate(auditTrailLogItemModel.OperationResult)) { if (ValidateModelState(Repository)) { if (Repository.Update(auditTrailLogItemModel.OperationResult, (AuditTrailLog)auditTrailLogItemModel.AuditTrailLog.ToData())) { if (UnitOfWork.Save(auditTrailLogItemModel.OperationResult)) { return(RedirectToUrlDictionary()); } } } } } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } auditTrailLogItemModel.IsSecurityOperations = IsSecurityOperations; return(View(auditTrailLogItemModel)); }
public ActionResult Create(string masterEntity = null, string masterKey = null) { AuditTrailLogItemModel auditTrailLogItemModel = new AuditTrailLogItemModel(ActivityOperations, "Create", masterEntity, masterKey); try { if (IsCreate(auditTrailLogItemModel.OperationResult)) { return(ZPartialView("CRUD", auditTrailLogItemModel)); } } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(auditTrailLogItemModel.OperationResult)); }
public ActionResult Create() { AuditTrailLogItemModel auditTrailLogItemModel = new AuditTrailLogItemModel() { IsSecurityOperations = this.IsSecurityOperations, AuditTrailLog = new AuditTrailLogViewModel(), ControllerAction = "Create" }; try { IsCreate(auditTrailLogItemModel.OperationResult); } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } return(PartialView(auditTrailLogItemModel)); }
public ActionResult Delete(AuditTrailLogItemModel auditTrailLogItemModel) { try { if (IsDelete(auditTrailLogItemModel.OperationResult)) { if (Application.Delete(auditTrailLogItemModel.OperationResult, (AuditTrailLog)auditTrailLogItemModel.AuditTrailLog.ToData())) { return(JsonResultSuccess(auditTrailLogItemModel.OperationResult)); } } } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } auditTrailLogItemModel.ActivityOperations = ActivityOperations; return(JsonResultOperationResult(auditTrailLogItemModel.OperationResult)); }
public ActionResult Delete(int id, string masterEntity = null, string masterKey = null) { AuditTrailLogItemModel auditTrailLogItemModel = new AuditTrailLogItemModel(ActivityOperations, "Delete", masterEntity, masterKey); try { if (IsDelete(auditTrailLogItemModel.OperationResult)) { AuditTrailLog auditTrailLog = Application.GetById(auditTrailLogItemModel.OperationResult, new object[] { id }); if (auditTrailLog != null) { auditTrailLogItemModel.AuditTrailLog = new AuditTrailLogViewModel(auditTrailLog); return(ZPartialView("CRUD", auditTrailLogItemModel)); } } } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(auditTrailLogItemModel.OperationResult)); }
public ActionResult Read(int id) { AuditTrailLogItemModel auditTrailLogItemModel = new AuditTrailLogItemModel(ActivityOperations, "Read"); try { if (IsRead(auditTrailLogItemModel.OperationResult)) { AuditTrailLog auditTrailLog = Application.GetById(auditTrailLogItemModel.OperationResult, new object[] { id }); if (auditTrailLog != null) { auditTrailLogItemModel.AuditTrailLog = new AuditTrailLogViewModel(auditTrailLog); return(ZPartialView("CRUD", auditTrailLogItemModel)); } } } catch (Exception exception) { auditTrailLogItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(auditTrailLogItemModel.OperationResult)); }