예제 #1
0
        /// <summary>
        ///
        /// </summary>
        private void dgvData_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == dgvData.Columns["BTN_SLIP_NUMBER"].Index)
                {
                    FrmPurchaseOrderSearch frm = new FrmPurchaseOrderSearch();
                    frm.CTag = CConstant.PURCHASE_ORDER_MASTER_SEARCH;

                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        if (!IsExist(frm.CurrentPurchaseOrderTable.SLIP_NUMBER, null))
                        {
                            if (frm.CurrentPurchaseOrderTable != null)
                            {
                                DataGridViewRow dr         = dgvData.Rows[e.RowIndex];
                                string          slipNumber = frm.CurrentPurchaseOrderTable.SLIP_NUMBER;
                                dr.Cells["PURCHASE_ORDER_SLIP_NUMBER"].Value = slipNumber;
                                dr.Cells["TOTAL_AMOUNT"].Value             = frm.CurrentPurchaseOrderTable.TOTAL_AMOUNT;
                                dr.Cells["PURCHASE_ORDER_SLIP_DATE"].Value = CConvert.ToDateTime(frm.CurrentPurchaseOrderTable.SLIP_DATE).ToString("yyyy-MM-dd");
                                dr.Cells["ARR_AMOUNT"].Value = bDepositArr.GetArrAmount(slipNumber);
                            }
                        }
                    }
                    frm.Dispose();
                }
            }
            catch (Exception ex)
            {
            }
        }
예제 #2
0
        private void btnPurchase_Click(object sender, EventArgs e)
        {
            FrmPurchaseOrderSearch frm = new FrmPurchaseOrderSearch();

            frm.CTag = CConstant.PURCHASE_ORDER_MASTER_SEARCH;
            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                if (frm.CurrentPurchaseOrderTable != null)
                {
                    string slipNumber = frm.CurrentPurchaseOrderTable.SLIP_NUMBER;
                    txtPurchaseNumber.Text = slipNumber;
                }
            }
            frm.Dispose();
        }