Exemplo n.º 1
0
        private void GridEmpresas_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            switch (SeleccionarSistema)
            {
            case 1:
                string nombreEmpresaComercial = "";
                nombreEmpresaComercial = GridEmpresas.Rows[e.RowIndex].Cells["BaseDeDatos"].Value.ToString();
                FuncionesComercial funcionesComercial = new FuncionesComercial();


                if (funcionesComercial.AbrirEmpresa(nombreEmpresaComercial) == 0)
                {
                    FormComercialPremium formComercialPremium = new FormComercialPremium();
                    formComercialPremium.Show();
                    this.Hide();
                }

                break;

            case 2:
                string nombreEmpresaAdminpaq = "";
                nombreEmpresaAdminpaq = GridEmpresas.Rows[e.RowIndex].Cells["BaseDeDatos"].Value.ToString();
                FuncionesAdminpaq funcionesAdminpaq = new FuncionesAdminpaq();


                if (funcionesAdminpaq.AbrirEmpresa(nombreEmpresaAdminpaq) == 0)
                {
                    FormAdminpaq formAdminpaq = new FormAdminpaq();
                    formAdminpaq.Show();
                    this.Hide();
                }

                break;


            default:
                break;
            }
        }