public ActionResult Update(AuditTrailConfigurationItemModel auditTrailConfigurationItemModel)
        {
            try
            {
                if (IsUpdate(auditTrailConfigurationItemModel.OperationResult))
                {
                    if (ValidateModelState(Repository))
                    {
                        if (Repository.Update(auditTrailConfigurationItemModel.OperationResult, (AuditTrailConfiguration)auditTrailConfigurationItemModel.AuditTrailConfiguration.ToData()))
                        {
                            if (UnitOfWork.Save(auditTrailConfigurationItemModel.OperationResult))
                            {
                                return(JsonResultSuccess(new { uri = ReadUrlDictionary() }));
                            }
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            return(JsonResultOperationResult(auditTrailConfigurationItemModel.OperationResult));
        }
        public ActionResult Delete(int?auditTrailConfigurationId)
        {
            AuditTrailConfigurationItemModel auditTrailConfigurationItemModel = new AuditTrailConfigurationItemModel()
            {
                IsSecurityOperations    = this.IsSecurityOperations,
                AuditTrailConfiguration = new AuditTrailConfigurationViewModel(),
                ControllerAction        = "Delete"
            };

            try
            {
                if (IsDelete(auditTrailConfigurationItemModel.OperationResult))
                {
                    AuditTrailConfiguration auditTrailConfiguration = Repository.GetById(new object[] { auditTrailConfigurationId });
                    if (auditTrailConfiguration != null)
                    {
                        auditTrailConfigurationItemModel.AuditTrailConfiguration = new AuditTrailConfigurationViewModel(auditTrailConfiguration);
                    }
                }
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            return(PartialView(auditTrailConfigurationItemModel));
        }
        public ActionResult Update(AuditTrailConfigurationItemModel auditTrailConfigurationItemModel)
        {
            try
            {
                if (IsUpdate(auditTrailConfigurationItemModel.OperationResult))
                {
                    if (ValidateModelState(Repository))
                    {
                        if (Repository.Update(auditTrailConfigurationItemModel.OperationResult, (AuditTrailConfiguration)auditTrailConfigurationItemModel.AuditTrailConfiguration.ToData()))
                        {
                            if (UnitOfWork.Save(auditTrailConfigurationItemModel.OperationResult))
                            {
                                return(RedirectToUrlDictionary());
                            }
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            auditTrailConfigurationItemModel.IsSecurityOperations = IsSecurityOperations;

            return(View(auditTrailConfigurationItemModel));
        }
        public ActionResult Update(AuditTrailConfigurationItemModel auditTrailConfigurationItemModel)
        {
            try
            {
                if (IsUpdate(auditTrailConfigurationItemModel.OperationResult))
                {
                    if (IsValid(auditTrailConfigurationItemModel.OperationResult, auditTrailConfigurationItemModel.AuditTrailConfiguration))
                    {
                        AuditTrailConfiguration auditTrailConfiguration = (AuditTrailConfiguration)auditTrailConfigurationItemModel.AuditTrailConfiguration.ToData();
                        if (Application.Update(auditTrailConfigurationItemModel.OperationResult, auditTrailConfiguration))
                        {
                            if (auditTrailConfigurationItemModel.IsSave)
                            {
                                return(JsonResultSuccess(auditTrailConfigurationItemModel.OperationResult,
                                                         Url.Action("Update", "AuditTrailConfiguration", new { Id = auditTrailConfiguration.Id }, Request.Url.Scheme)));
                            }
                            else
                            {
                                return(JsonResultSuccess(auditTrailConfigurationItemModel.OperationResult));
                            }
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            auditTrailConfigurationItemModel.ActivityOperations = ActivityOperations;

            return(JsonResultOperationResult(auditTrailConfigurationItemModel.OperationResult));
        }
        public ActionResult Create(string masterEntity = null, string masterKey = null)
        {
            AuditTrailConfigurationItemModel auditTrailConfigurationItemModel = new AuditTrailConfigurationItemModel(ActivityOperations, "Create", masterEntity, masterKey);

            try
            {
                if (IsCreate(auditTrailConfigurationItemModel.OperationResult))
                {
                    return(ZPartialView("CRUD", auditTrailConfigurationItemModel));
                }
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            return(JsonResultOperationResult(auditTrailConfigurationItemModel.OperationResult));
        }
        public ActionResult Create()
        {
            AuditTrailConfigurationItemModel auditTrailConfigurationItemModel = new AuditTrailConfigurationItemModel()
            {
                IsSecurityOperations    = this.IsSecurityOperations,
                AuditTrailConfiguration = new AuditTrailConfigurationViewModel(),
                ControllerAction        = "Create"
            };

            try
            {
                IsCreate(auditTrailConfigurationItemModel.OperationResult);
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            return(PartialView(auditTrailConfigurationItemModel));
        }
        public ActionResult Delete(AuditTrailConfigurationItemModel auditTrailConfigurationItemModel)
        {
            try
            {
                if (IsDelete(auditTrailConfigurationItemModel.OperationResult))
                {
                    if (Application.Delete(auditTrailConfigurationItemModel.OperationResult, (AuditTrailConfiguration)auditTrailConfigurationItemModel.AuditTrailConfiguration.ToData()))
                    {
                        return(JsonResultSuccess(auditTrailConfigurationItemModel.OperationResult));
                    }
                }
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            auditTrailConfigurationItemModel.ActivityOperations = ActivityOperations;

            return(JsonResultOperationResult(auditTrailConfigurationItemModel.OperationResult));
        }
        public ActionResult Delete(int id, string masterEntity = null, string masterKey = null)
        {
            AuditTrailConfigurationItemModel auditTrailConfigurationItemModel = new AuditTrailConfigurationItemModel(ActivityOperations, "Delete", masterEntity, masterKey);

            try
            {
                if (IsDelete(auditTrailConfigurationItemModel.OperationResult))
                {
                    AuditTrailConfiguration auditTrailConfiguration = Application.GetById(auditTrailConfigurationItemModel.OperationResult, new object[] { id });
                    if (auditTrailConfiguration != null)
                    {
                        auditTrailConfigurationItemModel.AuditTrailConfiguration = new AuditTrailConfigurationViewModel(auditTrailConfiguration);

                        return(ZPartialView("CRUD", auditTrailConfigurationItemModel));
                    }
                }
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            return(JsonResultOperationResult(auditTrailConfigurationItemModel.OperationResult));
        }
        public ActionResult Read(int id)
        {
            AuditTrailConfigurationItemModel auditTrailConfigurationItemModel = new AuditTrailConfigurationItemModel(ActivityOperations, "Read");

            try
            {
                if (IsRead(auditTrailConfigurationItemModel.OperationResult))
                {
                    AuditTrailConfiguration auditTrailConfiguration = Application.GetById(auditTrailConfigurationItemModel.OperationResult, new object[] { id });
                    if (auditTrailConfiguration != null)
                    {
                        auditTrailConfigurationItemModel.AuditTrailConfiguration = new AuditTrailConfigurationViewModel(auditTrailConfiguration);

                        return(ZPartialView("CRUD", auditTrailConfigurationItemModel));
                    }
                }
            }
            catch (Exception exception)
            {
                auditTrailConfigurationItemModel.OperationResult.ParseException(exception);
            }

            return(JsonResultOperationResult(auditTrailConfigurationItemModel.OperationResult));
        }