private void grpNmButton_Click(object sender, EventArgs e) { //Item Names if (this.grpComboBox.Text == "") { cmnCde.showMsg("Please select a Group Type!", 0); return; } string[] selVals = new string[1]; selVals[0] = this.grpNmIDTextBox.Text; string grpCmbo = ""; if (this.grpComboBox.Text == "Divisions/Groups") { grpCmbo = "Divisions/Groups"; } else if (this.grpComboBox.Text == "Grade") { grpCmbo = "Grades"; } else if (this.grpComboBox.Text == "Job") { grpCmbo = "Jobs"; } else if (this.grpComboBox.Text == "Position") { grpCmbo = "Positions"; } else if (this.grpComboBox.Text == "Site/Location") { grpCmbo = "Sites/Locations"; } else if (this.grpComboBox.Text == "Person Type") { grpCmbo = "Person Types"; } else if (this.grpComboBox.Text == "Working Hour Type") { grpCmbo = "Working Hours"; } else if (this.grpComboBox.Text == "Gathering Type") { grpCmbo = "Gathering Types"; } else if (this.grpComboBox.Text == "Companies/Institutions") { grpCmbo = "Schools/Organisations/Institutions"; } else { grpCmbo = "Active Persons"; } int[] selVal1s = new int[1]; DialogResult dgRes; if (this.grpComboBox.Text != "Person Type" && this.grpComboBox.Text != "Companies/Institutions") { dgRes = cmnCde.showPssblValDiag( cmnCde.getLovID(grpCmbo), ref selVals, true, true, cmnCde.Org_id, this.srchWrd, "Both", true); } else { if (this.grpComboBox.Text == "Person Type") { dgRes = cmnCde.showPssblValDiag( cmnCde.getLovID("Person Types"), ref selVal1s, true, true, this.srchWrd, "Both", true); } else { dgRes = cmnCde.showPssblValDiag( cmnCde.getLovID(grpCmbo), ref selVal1s, false, true, this.srchWrd, "Both", true); } } int slctn = 0; if (this.grpComboBox.Text != "Person Type" && this.grpComboBox.Text != "Companies/Institutions") { slctn = selVals.Length; } else { slctn = selVal1s.Length; } if (dgRes == DialogResult.OK) { this.grpNmIDTextBox.Text = "-1"; this.grpNmTextBox.Text = ""; for (int i = 0; i < slctn; i++) { if (this.grpComboBox.Text != "Person Type" && this.grpComboBox.Text != "Companies/Institutions") { this.grpNmIDTextBox.Text = selVals[i]; } if (this.grpComboBox.Text == "Divisions/Groups") { this.grpNmTextBox.Text = cmnCde.getDivName(int.Parse(selVals[i])); } else if (this.grpComboBox.Text == "Grade") { this.grpNmTextBox.Text = cmnCde.getGrdName(int.Parse(selVals[i])); } else if (this.grpComboBox.Text == "Job") { this.grpNmTextBox.Text = cmnCde.getJobName(int.Parse(selVals[i])); } else if (this.grpComboBox.Text == "Position") { this.grpNmTextBox.Text = cmnCde.getPosName(int.Parse(selVals[i])); } else if (this.grpComboBox.Text == "Site/Location") { this.grpNmTextBox.Text = cmnCde.getSiteName(int.Parse(selVals[i])); } else if (this.grpComboBox.Text == "Person Type") { this.grpNmIDTextBox.Text = selVal1s[i].ToString(); this.grpNmTextBox.Text = cmnCde.getPssblValNm(selVal1s[i]); } else if (this.grpComboBox.Text == "Companies/Institutions") { this.grpNmIDTextBox.Text += cmnCde.getGnrlRecID("scm.scm_cstmr_suplr", "cust_sup_name", "cust_sup_id", cmnCde.getPssblValNm(selVal1s[i]), cmnCde.Org_id).ToString() + ";"; this.grpNmTextBox.Text += cmnCde.getPssblValNm(selVal1s[i]) + ";"; System.Windows.Forms.Application.DoEvents(); } else if (this.grpComboBox.Text == "Working Hour Type") { this.grpNmTextBox.Text = cmnCde.getWkhName(int.Parse(selVals[i])); } else if (this.grpComboBox.Text == "Gathering Type") { this.grpNmTextBox.Text = cmnCde.getGathName(int.Parse(selVals[i])); } else { this.prsnID = cmnCde.getPrsnID(selVals[i]); this.grpNmIDTextBox.Text = this.prsnID.ToString(); this.grpNmTextBox.Text = cmnCde.getPrsnName(this.prsnID) + " (" + selVals[i] + ")"; } } } }