/// <summary> /// /// </summary> private void dgvData_CellClick(object sender, DataGridViewCellEventArgs e) { try { if (e.ColumnIndex == dgvData.Columns["BTN_SLIP_NUMBER"].Index) { FrmOrdersSearch frm = new FrmOrdersSearch(); frm.CTag = CConstant.ORDER_MASTER_SEARCH; if (frm.ShowDialog(this) == DialogResult.OK) { if (!IsExist(frm.orderTable.SLIP_NUMBER, null)) { if (frm.orderTable != null) { DataGridViewRow dr = dgvData.Rows[e.RowIndex]; string slipNumber = frm.orderTable.SLIP_NUMBER; dr.Cells["ORDER_SLIP_NUMBER"].Value = slipNumber; dr.Cells["AMOUNT_INCLUDED_TAX"].Value = frm.orderTable.AMOUNT_INCLUDED_TAX; dr.Cells["ORDER_SLIP_DATE"].Value = CConvert.ToDateTime(frm.orderTable.SLIP_DATE).ToString("yyyy-MM-dd"); dr.Cells["ARR_AMOUNT"].Value = bDepositArr.GetArrAmount(slipNumber); } } } frm.Dispose(); } } catch (Exception ex) { } }
private void btnOrders_Click(object sender, EventArgs e) { FrmOrdersSearch frm = new FrmOrdersSearch(); frm.CTag = CConstant.ORDER_MASTER_SEARCH; if (frm.ShowDialog(this) == DialogResult.OK) { if (frm.orderTable != null) { string slipNumber = frm.orderTable.SLIP_NUMBER; txtOrderNumber.Text = slipNumber; } } frm.Dispose(); }