示例#1
0
        private void btnCargarCompra_Click(object sender, EventArgs e)
        {
            FacturacionCompraWF _compra = new FacturacionCompraWF(cuit, razonSocial, cuit);

            _compra.Show();
            Hide();
        }
示例#2
0
        private void dgvProveedor_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (dgvProveedor.CurrentCell.ColumnIndex == 3)
                {
                    string idSub       = dgvProveedor.CurrentRow.Cells[0].Value.ToString();
                    string cuit        = dgvProveedor.CurrentRow.Cells[1].Value.ToString();
                    string RazonSocial = dgvProveedor.CurrentRow.Cells[2].Value.ToString();

                    //CODIGO SOLO PERMITE 2 INSTANCIAS DEL FORMULARIO CLIENTES
                    //---------------------------------------------
                    int existe = Application.OpenForms.OfType <FacturacionCompraWF>().Count();
                    if (existe <= 2)
                    {
                        FacturacionCompraWF frm2 = Application.OpenForms.OfType <FacturacionCompraWF>().SingleOrDefault();
                        if (frm2 != null)
                        {
                            frm2.txtApellidoNombre.Text = RazonSocial;
                            frm2.txtCuit.Text           = cuit;
                            frm2.lblidProveedor.Text    = idSub;
                            frm2.IniciarPantalla();
                            Close();
                        }
                        //FacturacionSubClientesWF frm = new FacturacionSubClientesWF(null, null);
                        //frm.Show();
                    }
                    else
                    {
                        foreach (var item in Application.OpenForms.OfType <FacturacionSubClientesWF>())
                        {
                            item.BringToFront();
                        }
                    }
                }
            }
            catch (Exception ex)
            { }
        }