Пример #1
0
        private void CustomerDataRecord2_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmInvoice frm = new frmInvoice();

            // frm.label6.Text = label1.Text;
            frm.Show();
        }
Пример #2
0
        private void btnTransactions_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmInvoice frm = new frmInvoice();

            frm.lblCashier.Text = lblUser.Text;
            frm.Show();
        }
Пример #3
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow row = dataGridView1.SelectedRows[0];
                this.Hide();
                frmInvoice frm = new frmInvoice();
                frm.Show();

                frm.txtInvoiceNo.Text    = row.Cells[0].Value.ToString();
                frm.dtpInvoiceDate.Text  = row.Cells[1].Value.ToString();
                frm.txtCustID.Text       = row.Cells[2].Value.ToString();
                frm.txtCustName.Text     = row.Cells[3].Value.ToString();
                frm.txtSubTotal.Text     = row.Cells[4].Value.ToString();
                frm.txtVAT.Text          = row.Cells[5].Value.ToString();
                frm.txtVatAmount.Text    = row.Cells[6].Value.ToString();
                frm.txtGrandTotal.Text   = row.Cells[7].Value.ToString();
                frm.txtTotalPayment.Text = row.Cells[8].Value.ToString();
                frm.txtPaymentDue.Text   = row.Cells[9].Value.ToString();
                frm.txtRemarks.Text      = row.Cells[10].Value.ToString();
                frm.btnUpdate.Enabled    = true;
                frm.btnDelete.Enabled    = true;
                frm.btnPrint.Enabled     = true;
                frm.btnSave.Enabled      = false;

                BOCustomer      BO = new BOCustomer();
                BusinessManager BM = new BusinessManager();
                BO.InvoiceNo = frm.txtInvoiceNo.Text.Trim();
                DataTable dt = BM.BALSalesRecordFillList(BO);
                foreach (DataRow drow in dt.Rows)
                {
                    //cmbCustomerName.Items.Add(drow[0].ToString());
                    ListViewItem lst = new ListViewItem();
                    lst.SubItems.Add(drow[0].ToString().Trim());
                    lst.SubItems.Add(drow[1].ToString().Trim());
                    lst.SubItems.Add(drow[2].ToString().Trim());
                    lst.SubItems.Add(drow[3].ToString().Trim());
                    lst.SubItems.Add(drow[4].ToString().Trim());
                    frm.listView1.Items.Add(lst);
                }
                frm.listView1.Enabled  = false;
                frm.btnAddCart.Enabled = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #4
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmInvoice frm = new frmInvoice();
                frm.Show();
                frm.txtCustID.Text   = dr.Cells[0].Value.ToString();
                frm.txtCustName.Text = dr.Cells[1].Value.ToString();
                //frm.label6.Text = label1.Text;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #5
0
        private void frmSalesRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmInvoice frm = new frmInvoice();

            frm.Show();
        }