private void SetSecUsersAndRoles(PlusForm form) { form.secRoles.Clear(); string sqlGM = string.Format(GloFix.secGroups, this.MenuId); DataTable tabGM = null; object[] ret1 = CliUtils.CallMethod("GLModule", "ExcuteWorkFlow", new object[] { sqlGM }); if (ret1 != null && (int)ret1[0] == 0) { tabGM = ((DataSet)ret1[1]).Tables[0]; } foreach (DataRow row in tabGM.Rows) { form.secRoles.Add(row["GROUPID"].ToString()); } }
public bool Plus() { PlusForm frmPlus = new PlusForm(); string keys = "", values = ""; frmPlus.flowPath = _flowPath; frmPlus.listId = _listId; frmPlus.sendToId = _sendToId; frmPlus.isImportant = _isImport ? 1 : 0; frmPlus.isUrgent = _isUrgent ? 1 : 0; frmPlus.attachments = this._attachments; if (this.FLNotifySecControl) SetSecUsersAndRoles(frmPlus); object dataSource = this.BindingSource.GetDataSource(); if (dataSource != null && dataSource is InfoDataSet) { InfoDataSet ds = (InfoDataSet)dataSource; frmPlus.provider = ds.RemoteName; object objCurrent = this.BindingSource.Current; if (objCurrent != null && objCurrent is DataRowView) { ArrayList lstKeys = ds.GetKeyFields(); if (lstKeys.Count > 0) { DataRowView rowView = (DataRowView)objCurrent; foreach (string key in lstKeys) { keys += key + ";"; if (GloFix.IsNumeric(rowView[key].GetType())) { values += key + " = " + rowView[key].ToString() + ";"; } else { values += key + " = ''" + rowView[key].ToString() + "'';"; } } if (keys != "") { frmPlus.keys = keys.Substring(0, keys.LastIndexOf(';')); frmPlus.values = values.Substring(0, values.LastIndexOf(';')); } } } else { string selDataMessage = SysMsg.GetSystemMessage(CliUtils.fClientLang, "FLTools", "GloFix", "SelectData", true); MessageBox.Show(selDataMessage); return false; } } bool b = frmPlus.ShowDialog() == DialogResult.OK; return b; }