예제 #1
0
        private void Button1_Click_1(object sender, EventArgs e)
        {
            AddInvoiceDetailForm addInvoice = new AddInvoiceDetailForm(this);

            addInvoice.butonApasat = 1;
            addInvoice.Show();
            this.Hide();
            if (Convert.ToInt32(dGVInvoiceDetails.SelectedRows[0].Cells[7].Value) == 1)
            {
                dGVInvoiceDetails.SelectedRows[0].Cells[7].Value = 1;
            }
            else
            {
                dGVInvoiceDetails.SelectedRows[0].Cells[7].Value = 2;
            }

            List <InvoiceDetailModel> invoiceDetailModels = new List <InvoiceDetailModel>();

            for (int i = 0; i < dGVInvoiceDetails.RowCount; i++)
            {
                InvoiceDetailModel invoicedetail = new InvoiceDetailModel();
                invoicedetail = (InvoiceDetailModel)dGVInvoiceDetails.Rows[i].DataBoundItem;
                invoiceDetailModels.Add(invoicedetail);
            }
            addInvoice.invoiceDetailModels = invoiceDetailModels;

            addInvoice.txtBoxPrice.Text     = dGVInvoiceDetails.SelectedRows[0].Cells[5].Value.ToString();
            addInvoice.txtBoxAmount.Text    = dGVInvoiceDetails.SelectedRows[0].Cells[4].Value.ToString();
            addInvoice.txtBoxQtty.Text      = dGVInvoiceDetails.SelectedRows[0].Cells[3].Value.ToString();
            addInvoice.txtObservations.Text = dGVInvoiceDetails.SelectedRows[0].Cells[6].Value.ToString();
        }
        private void BtnAddDetails_Click(object sender, EventArgs e)
        {
            AddInvoiceDetailForm addInvoiceDetailForm = new AddInvoiceDetailForm(invoiceId, this);

            addInvoiceDetailForm.Show();
            this.Hide();
            addInvoiceDetailForm.FormClosed += AddInvoiceDetailForm_FormClosed;
        }
예제 #3
0
        private void Button1_Click(object sender, EventArgs e)
        {
            AddInvoiceDetailForm addInvoice = new AddInvoiceDetailForm(this);

            addInvoice.Show();
            this.Hide();
            List <InvoiceDetailModel> invoiceDetailModels = new List <InvoiceDetailModel>();

            for (int i = 0; i < dGVInvoiceDetails.RowCount; i++)
            {
                InvoiceDetailModel invoicedetail = new InvoiceDetailModel();
                invoicedetail = (InvoiceDetailModel)dGVInvoiceDetails.Rows[i].DataBoundItem;
                invoiceDetailModels.Add(invoicedetail);
            }
            addInvoice.invoiceDetailModels = invoiceDetailModels;
        }