protected void cboEmpresalogueo_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            txtusuario.Text = "";
            txtusuario.Focus();

            empresasWebBL BL = new empresasWebBL();
            tb_empresa BE = new tb_empresa();

            DataTable dt2 = new DataTable();

            BE.empresaid = cboEmpresalogueo.SelectedValue;
            dt2 = BL.GetAll(BE).Tables[0];
            Session["ssEmpresaID"] = dt2.Rows[0]["empresaid"];
            Session["ssEmpresaName"] = dt2.Rows[0]["empresaname"];
            Session["ssEmpresaRuc"] = dt2.Rows[0]["empresaruc"];

            Session["ssGerenteGeneral"] = dt2.Rows[0]["gerentegeneral"];
            Session["ssGerenteNrodni"] = dt2.Rows[0]["nrodni"];
            Session["ssPartElectro"] = dt2.Rows[0]["partidaelectronica"];

            if (dt2.Rows[0]["foto"].ToString().Trim().Length != 0)
            {
                Session["ssLogo"] = dt2.Rows[0]["foto"];
            }
            else
            {
                Session["ssLogo"] = "nologoempresa.png";
            }
        }
        catch (Exception ex)
        {
            ClientMessage(ex.Message);
        }
    }
    private void get_cargarComboEmpresas()
    {
        empresasWebBL empresaBL = new empresasWebBL();
        tb_empresa tb_empresa = new tb_empresa();
        DataTable dt = new DataTable();

        try
        {
            dt = empresaBL.GetAll(tb_empresa).Tables[0];
            cboEmpresalogueo.DataSource = dt;
            cboEmpresalogueo.DataValueField = "empresaid";
            cboEmpresalogueo.DataTextField = "empresaname";
            cboEmpresalogueo.DataBind();
        }
        catch (Exception ex)
        {
            ClientMessage(ex.Message);
        }
    }
    void Datos_Empresa()
    {
        empresasWebBL BL = new empresasWebBL();
        tb_empresa BE = new tb_empresa();
        DataTable dt2 = new DataTable();

        BE.empresaid = "99";
        dt2 = BL.GetAll(BE).Tables[0];
        Session["ssEmpresaID"] = dt2.Rows[0]["empresaid"];
        Session["ssEmpresaName"] = dt2.Rows[0]["empresaname"];
        Session["ssEmpresaRuc"] = dt2.Rows[0]["empresaruc"];

        Session["ssGerenteGeneral"] = dt2.Rows[0]["gerentegeneral"];
        Session["ssGerenteNrodni"] = dt2.Rows[0]["nrodni"];
        Session["ssPartElectro"] = dt2.Rows[0]["partidaelectronica"];
    }