private void btnAdd_Click(object sender, EventArgs e) { VoucherDetailUI loVoucherDetail = new VoucherDetailUI(); loVoucherDetail.ParentList = this; loVoucherDetail.ShowDialog(); }
private void btnAdd_Click(object sender, EventArgs e) { try { VoucherDetailUI loVoucherDetail = new VoucherDetailUI(); loVoucherDetail.ParentList = this; loVoucherDetail.ShowDialog(); } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnAdd_Click"); em.ShowDialog(); return; } }
private void btnEdit_Click(object sender, EventArgs e) { try { VoucherDetailUI loVoucherDetail = new VoucherDetailUI( dgvDetail.CurrentRow.Cells["Id"].Value.ToString(), dgvDetail.CurrentRow.Cells["AccountId"].Value.ToString(), decimal.Parse(dgvDetail.CurrentRow.Cells["Debit"].Value.ToString()), decimal.Parse(dgvDetail.CurrentRow.Cells["Credit"].Value.ToString()), dgvDetail.CurrentRow.Cells["Subsidiary"].Value.ToString(), dgvDetail.CurrentRow.Cells["SubsidiaryId"].Value.ToString(), dgvDetail.CurrentRow.Cells["Description"].Value.ToString(), dgvDetail.CurrentRow.Cells["Remarks"].Value.ToString()); loVoucherDetail.ParentList = this; loVoucherDetail.ShowDialog(); } catch { } }
private void btnEdit_Click(object sender, EventArgs e) { try { VoucherDetailUI loVoucherDetail = new VoucherDetailUI( dgvDetail.CurrentRow.Cells["Id"].Value.ToString(), dgvDetail.CurrentRow.Cells["AccountId"].Value.ToString(), decimal.Parse(dgvDetail.CurrentRow.Cells["Debit"].Value.ToString()), decimal.Parse(dgvDetail.CurrentRow.Cells["Credit"].Value.ToString()), dgvDetail.CurrentRow.Cells["Subsidiary"].Value.ToString(), dgvDetail.CurrentRow.Cells["SubsidiaryId"].Value.ToString(), dgvDetail.CurrentRow.Cells["Description"].Value.ToString(), dgvDetail.CurrentRow.Cells["Remarks"].Value.ToString()); loVoucherDetail.ParentList = this; loVoucherDetail.ShowDialog(); } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnEdit_Click"); em.ShowDialog(); return; } }