private void extInfoDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.Equals(null) || this.obeyEvnts == false || this.canEdit == false) { return; } if (e.RowIndex < 0) { return; } if (this.canEdit == false) { cmnCde.showMsg("You don't have permission to perform" + " this action!\nContact your System Administrator!", 0); return; } if (this.extInfoDataGridView.Rows[e.RowIndex].Cells[4].Value == null) { this.extInfoDataGridView.Rows[e.RowIndex].Cells[4].Value = "-1"; } if (this.extInfoDataGridView.Rows[e.RowIndex].Cells[5].Value == null) { this.extInfoDataGridView.Rows[e.RowIndex].Cells[5].Value = "-1"; } if (this.extInfoDataGridView.Rows[e.RowIndex].Cells[0].Value == null) { this.extInfoDataGridView.Rows[e.RowIndex].Cells[0].Value = string.Empty; } if (this.extInfoDataGridView.Rows[e.RowIndex].Cells[2].Value == null) { this.extInfoDataGridView.Rows[e.RowIndex].Cells[2].Value = string.Empty; } if (this.extInfoDataGridView.Rows[e.RowIndex].Cells[3].Value == null) { this.extInfoDataGridView.Rows[e.RowIndex].Cells[3].Value = string.Empty; } if (e.ColumnIndex == 1) { int[] selVals = new int[1]; selVals[0] = cmnCde.getPssblValID(this.extInfoDataGridView.Rows[e.RowIndex].Cells[0].Value.ToString(), cmnCde.getLovID("Extra Information Labels")); DialogResult dgRes = cmnCde.showPssblValDiag( cmnCde.getLovID("Extra Information Labels"), ref selVals, true, false); if (dgRes == DialogResult.OK) { for (int i = 0; i < selVals.Length; i++) { this.extInfoDataGridView.Rows[e.RowIndex].Cells[0].Value = cmnCde.getPssblValNm(selVals[i]); } } } }
private void dscntLOVSrch() { string[] selVals = new string[1]; selVals[0] = this.itmIDTextBox.Text; DialogResult dgRes = cmnCde.showPssblValDiag( cmnCde.getLovID("Discount Codes"), ref selVals, true, false, cmnCde.Org_id, this.srchWrd, "Both", this.autoLoad); if (dgRes == DialogResult.OK) { for (int i = 0; i < selVals.Length; i++) { this.itmIDTextBox.Text = selVals[i]; this.dscntNameTextbox.Text = cmnCde.getGnrlRecNm("scm.scm_tax_codes", "code_id", "code_name", int.Parse(selVals[i])); if (selVals[i] != "-1") { this.prcntNumericUpDown.Enabled = false; this.flatNumericUpDown.Enabled = false; this.flatValRadioButton.Enabled = false; this.prcntRadioButton.Enabled = false; } else { this.prcntRadioButton.Checked = !this.prcntRadioButton.Checked; } } } }
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] + ")"; } } } }