Beispiel #1
0
        public SystemMessage utl_Grid_Permission_Save(utl_Grid_Permission data)
        {
            SystemMessage systemMessage = new SystemMessage();

            try
            {
                var param = new DynamicParameters();
                param.Add("@Id", data.Id);
                param.Add("@GridId", data.GridId);
                param.Add("@PermissionId", data.PermissionId);
                param.Add("@PermissionType", data.PermissionType);
                param.Add("@IsAdd", data.IsAdd);
                param.Add("@IsEdit", data.IsEdit);
                param.Add("@IsDelete", data.IsDelete);
                param.Add("@IsActive", data.IsActive);
                param.Add("@IsFilterButton", data.IsFilterButton);
                param.Add("@IsExportExcel", data.IsExportExcel);
                param.Add("@IsImportExcel", data.IsImportExcel);
                param.Add("@IsSubmit", data.IsSubmit);
                param.Add("@IsApproval", data.IsApproval);
                param.Add("@IsDisApproval", data.IsDisApproval);
                param.Add("@IsCopy", data.IsCopy);
                UnitOfWork.ProcedureExecute("utl_Grid_Permission_Save", param);
                systemMessage.IsSuccess = true;
                return(systemMessage);
            }
            catch (Exception e)
            {
                systemMessage.IsSuccess = false;
                systemMessage.Message   = e.ToString();
                return(systemMessage);
            }
        }
Beispiel #2
0
        public ActionResult utl_Grid_Permission_Save(utl_Grid_Permission data)
        {
            var db     = new utl_Grid_Permission_DAL();
            var result = db.utl_Grid_Permission_Save(data);

            if (result.IsSuccess == true)
            {
                result.Message = AppRes.MS_Update_success;
            }
            else
            {
                result.Message = AppRes.MS_Update_error;
            }
            return(Content(JsonConvert.SerializeObject(new
            {
                result
            })));
        }