public string SavePermission(SYS_tblPermissionDTO item, int type) { string strParameter = "", strActivity = "", strValue = ""; strParameter = (type == 0) ? "GroupID" : "UsernameOther"; strActivity = (type == 0) ? "UpdateGroupUserPermission" : "UpdateUserPermission"; strValue = (type == 0) ? item.GroupID : item.UserName; return db.sExecuteSQL("SYS_spfrmPermission", new string[] { "Activity", "Username", "LanguageID", strParameter, "FunctionID", "AllowInsert", "AllowUpdate", "AllowDelete", "AllowAccess", "AllowPrint", "AllowImport", "AllowExport", "UserLevelID", "Note" }, new object[] { strActivity, item.Username, item.LanguageID, strValue, item.FunctionID, item.AllowInsert, item.AllowUpdate, item.AllowDelete, item.AllowAccess, item.AllowPrint, item.AllowImport, item.AllowExport, item.UserLevelID, item.Note }); }
private void SetPermission() { permission = busPermission.GetPermissionByFunction(User.UserInfo.Username, User.UserInfo.LanguageID, "20", User.UserInfo.Username); if (txtLevel1ID.Text.Equals("")) { btnSaveClose.Enabled = permission.AllowInsert; btnSaveInsert.Enabled = permission.AllowInsert; } else { btnSaveClose.Enabled = permission.AllowUpdate; btnSaveInsert.Enabled = permission.AllowInsert && permission.AllowUpdate; } }
private void SetPermission() { permission = busPermission.GetPermissionByFunction(User.UserInfo.Username, User.UserInfo.LanguageID, "8", User.UserInfo.Username); btnInsert.Enabled = permission.AllowInsert; btnDelete.Enabled = permission.AllowDelete; btnPrint.Enabled = permission.AllowPrint; btnImport.Enabled = permission.AllowImport; btnExport.Enabled = permission.AllowExport; }
public string SavePermission(SYS_tblPermissionDTO item, int type) { return daoPermission.SavePermission(item, type); }