private void cmdEdit_Click(object sender, EventArgs e) { InboundDocuments.RefEditForm.FaxDataType dataType; string faxNumber = null; string codeDesc = null; if (this.tabPage.SelectedTabPageIndex == 0) { dataType = RefEditForm.FaxDataType.CounterPartyFax; int rowHandle = this.gridView1.FocusedRowHandle; faxNumber = (string)this.gridView1.GetRowCellValue(rowHandle, "CALLER_REF"); codeDesc = (string)this.gridView1.GetRowCellValue(rowHandle, "CPTY_SHORT_CODE"); } else { dataType = RefEditForm.FaxDataType.SpamFax; int rowHandle = this.gridView2.FocusedRowHandle; faxNumber = (string)this.gridView2.GetRowCellValue(rowHandle, "CALLER_REF"); codeDesc = (string)this.gridView2.GetRowCellValue(rowHandle, "DESCRIPTION"); } RefEditForm editForm = new RefEditForm(dataType, RefEditForm.FormMode.Edit, this.connectionString, faxNumber, codeDesc); if (editForm.ShowDialog(this) == DialogResult.OK) { if (this.tabPage.SelectedTabPageIndex == 0) { RefreshCptyData(); } else { RefreshSpamData(); } } }
private void cmdAdd_Click(object sender, EventArgs e) { InboundDocuments.RefEditForm.FaxDataType dataType; if (this.tabPage.SelectedTabPageIndex == 0) { dataType = RefEditForm.FaxDataType.CounterPartyFax; } else { dataType = RefEditForm.FaxDataType.SpamFax; } RefEditForm editForm = new RefEditForm(dataType, RefEditForm.FormMode.Add, this.connectionString, "", ""); if (editForm.ShowDialog(this) == DialogResult.OK) { if (this.tabPage.SelectedTabPageIndex == 0) { RefreshCptyData(); } else { RefreshSpamData(); } } }
private void cmdAdd_Click(object sender, EventArgs e) { InboundDocuments.RefEditForm.FaxDataType dataType ; if (this.tabPage.SelectedTabPageIndex == 0 ){ dataType = RefEditForm.FaxDataType.CounterPartyFax; } else { dataType = RefEditForm.FaxDataType.SpamFax; } RefEditForm editForm = new RefEditForm(dataType, RefEditForm.FormMode.Add, this.connectionString, "", ""); if ( editForm.ShowDialog(this) == DialogResult.OK ){ if (this.tabPage.SelectedTabPageIndex == 0) { RefreshCptyData(); } else { RefreshSpamData(); } } }
private void cmdEdit_Click(object sender, EventArgs e) { InboundDocuments.RefEditForm.FaxDataType dataType; string faxNumber = null; string codeDesc = null; if (this.tabPage.SelectedTabPageIndex == 0) { dataType = RefEditForm.FaxDataType.CounterPartyFax; int rowHandle = this.gridView1.FocusedRowHandle; faxNumber = (string) this.gridView1.GetRowCellValue(rowHandle, "CALLER_REF"); codeDesc = (string) this.gridView1.GetRowCellValue(rowHandle, "CPTY_SHORT_CODE"); } else { dataType = RefEditForm.FaxDataType.SpamFax; int rowHandle = this.gridView2.FocusedRowHandle; faxNumber = (string)this.gridView2.GetRowCellValue(rowHandle, "CALLER_REF"); codeDesc = (string)this.gridView2.GetRowCellValue(rowHandle, "DESCRIPTION"); } RefEditForm editForm = new RefEditForm(dataType, RefEditForm.FormMode.Edit, this.connectionString, faxNumber, codeDesc); if (editForm.ShowDialog(this) == DialogResult.OK) { if (this.tabPage.SelectedTabPageIndex == 0) { RefreshCptyData(); } else { RefreshSpamData(); } } }