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;
             }
         }
     }
 }
Esempio n. 2
0
        private void btn_rep_prestamo_Click(object sender, EventArgs e)
        {
            Form Frm_Rep_Facturas = Application.OpenForms.OfType <Form>().Where(pre => pre.Name == "Frm_Rep_Facturas").SingleOrDefault();

            if (Frm_Rep_Facturas == null)
            {
                Frm_Rep_Facturas frm = new Frm_Rep_Facturas();
                frm.MdiParent = this;
                frm.Show();
            }
        }