Esempio n. 1
0
        private void btnYeniSatir_Click(object sender, EventArgs e)
        {
            using (FrmInvoiceLineViewer frm = new FrmInvoiceLineViewer())
            {
                frm.InvoiceLine = null;
                List <InvoiceLineType> l = new List <InvoiceLineType>();
                l.AddRange(invoice.InvoiceLine);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    l.Add(frm.InvoiceLine);
                    invoice.InvoiceLine = l.ToArray();

                    //Sıra Numarası veriyoruz
                    int i = 0;
                    foreach (var item in invoice.InvoiceLine)
                    {
                        i++;
                        item.ID       = new IDType();
                        item.ID.Value = i.ToString();
                    }

                    GridDoldur(invoice);
                }
            }
        }
Esempio n. 2
0
 private void dataGridView1_DoubleClick(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count > 0)
     {
         DataGridViewRow row = dataGridView1.SelectedRows[0];
         if (row != null)
         {
             var r = (row.Tag as InvoiceLineType);
             using (FrmInvoiceLineViewer frm = new FrmInvoiceLineViewer())
             {
                 frm.InvoiceLine = r;
                 if (frm.ShowDialog() == DialogResult.OK)
                 {
                     GridDoldur(invoice);
                 }
             }
         }
     }
 }