private void DG_DoubleClick(object sender, EventArgs e)
 {
     if (DG.Rows.Count > 0)
     {
         Frm_Factura            dato  = new Frm_Factura();
         Frm_Rep_Facturas       dato1 = new Frm_Rep_Facturas();
         Frm_Reimprimir_Recibos dato2 = new Frm_Reimprimir_Recibos();
         foreach (Form frm in Application.OpenForms)
         {
             if (frm.Name == "Frm_Factura")
             {
                 dato = (Frm_Factura)frm;
                 dato.cb_cliente.Text = DG.SelectedCells[2].Value.ToString();
                 this.Close();
                 break;
             }
             else if (frm.Name == "Frm_Rep_Facturas")
             {
                 dato1 = (Frm_Rep_Facturas)frm;
                 dato1.cb_cliente.Text = DG.SelectedCells[2].Value.ToString();
                 this.Close();
                 break;
             }
             else if (frm.Name == "Frm_Reimprimir_Recibos")
             {
                 dato2 = (Frm_Reimprimir_Recibos)frm;
                 dato2.cb_cliente.Text = DG.SelectedCells[2].Value.ToString();
                 this.Close();
                 break;
             }
         }
     }
 }
示例#2
0
        private void btn_nuevo_Click(object sender, EventArgs e)
        {
            Frm_Factura frm = new Frm_Factura();

            frm.Closed += new EventHandler(frm_Closed);
            frm.ShowDialog();
        }
示例#3
0
        public void Pasar_Datos()
        {
            if (DG.RowCount == 0)
            {
                return;
            }
            FACTURAS obj = new FACTURAS();

            obj.ID_FACTURA = Convert.ToInt32(DG.SelectedCells[0].Value);
            Frm_Factura frm = new Frm_Factura();

            frm.Recibir_Datos(obj);
            frm.Titulo("Editar Factura");
            frm.Closed += new EventHandler(frm_Closed);
            frm.ShowDialog();
        }