protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        int    intTipo     = Int32.Parse(Request.QueryString["tipo"].ToString());
        int    intMonedaId = Int32.Parse(Request.QueryString["monedaId"].ToString());
        String strValor    = Request.QueryString["valor"].ToString();

        lblTitulo.Text = ((intTipo == 0) ? "JOB: " : "ORDEN DE SERVICIO: ") + strValor;

        switch (intMonedaId)
        {
        case 1:
            lblTitulo.Text = lblTitulo.Text + " PESOS";
            break;

        case 2:
            lblTitulo.Text = lblTitulo.Text + " DOLARES";
            break;

        case 3:
            lblTitulo.Text = lblTitulo.Text + " EUROS";
            break;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            String error = Utilis.validaPermisos(Session, NUMFUNCION);
            if (!error.Equals(""))
            {
                Response.Redirect(error);
            }
            error = Utilis.validaPermisos(Session, NUMFUNCION);
            //string fecha = DateTime.Now.ToShortDateString();
            //falta = Convert.ToDateTime(((HiddenField)Master.FindControl("hdnDate")).Value);
            div_visualizar.Visible = false;
            div_sinperfil.Visible  = false;
            plaza = this.Session["ubicacion"].ToString();
            SinPerfil2();

            do
            {
                id_sinper = GenerarIdSinPerfil();
            } while (Validar_IdPerfil(id_sinper) != 0);
            if (!IsPostBack)
            {
                IniciarLllenadoDropDown();
            }
        }
        catch (Exception ex)
        {
        }
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        //String[,] arrClientes;
        //ClienteVO VOcliente = new ClienteVO();
        //ClienteBL BLcliente = new ClienteBL();
        //VOcliente.Operacion = ClienteVO.LISTACLIENTES;
        //VOcliente = (ClienteVO)BLcliente.execute(VOcliente);
        //arrClientes = VOcliente.ArrClientes;

        //int a;
        //for (int i = 0; i <= arrClientes.GetLength(1) - 1; i++)
        //{
        //    a = i + 1;
        //    lslCliente.Items.Insert(a, new ListItem(arrClientes[1, i], arrClientes[0, i]));
        //}

        GridView1.Visible = false;
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        if (!IsPostBack)
        {
            txtFechaCalendario.Text   = "01/" + DateTime.Now.ToString("MM/yyyy");
            AgregaFechaDiv.Visible    = false;
            AgregaAgenteDiv.Visible   = false;
            AgregaGarantiaDiv.Visible = false;
            EditAgenteDiv.Visible     = false;
            garantiaFhEditDiv.Visible = false;

            txtSucursal.Enabled     = false;
            txtSucursarEdit.Enabled = false;
            lblValidaFechas.Text    = "";
            btnShowAgente.Visible   = true;
        }
        //INFORMACION DE LA SESION
        InfoSessionVO infoSession = (InfoSessionVO)Session["InfoSession"];

        lblUsuario.Text      = infoSession.getValor(InfoSessionVO.USUARIOID).ToString();
        Session["usuarioId"] = infoSession.getValor(InfoSessionVO.USUARIOID);
    }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        if (!IsPostBack)
        {
            ImageButton mp_imgBtnHelp = (ImageButton)Master.FindControl("imgBtnHelp");
            //Label mpLabel = (Label)Master.FindControl("masterPageLabel");
            if (mp_imgBtnHelp != null)
            {
                mp_imgBtnHelp.Enabled = true;
                mp_imgBtnHelp.Visible = true;
                //mp_imgBtnHelp.Attributes.Add("OnClick", "Ayuda('Help.aspx')");
                mp_imgBtnHelp.Attributes.Add("OnClick", "openwindow()");
            }
        }
        //if (Page.IsValid)
        //{

        //}
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //Response.AddHeader("REFRESH", "300"); // se refresca la pagina cada 5 min

        // // SEGURIDAD
        String error  = Utilis.validaPermisos(Session, NUMFUNCION);
        String error2 = Utilis.validaPermisos(Session, NUMFUNCION2);
        String error3 = Utilis.validaPermisos(Session, NUMFUNCION3);
        String error4 = Utilis.validaPermisos(Session, NUMFUNCION4);
        String error5 = Utilis.validaPermisos(Session, NUMFUNCION5);

        if (!error.Equals("") && !error2.Equals("") && !error3.Equals("") && !error4.Equals("") && !error5.Equals(""))
        {
            Response.Redirect(error);
        }


        //else if ((Utilis.validaPermisos(Session, 24)).Equals(""))
        //{
        //    Response.Redirect(error);
        //}

        InfoSessionVO infoSession;

        infoSession = (InfoSessionVO)Session["InfoSession"];
        if (infoSession.getValor(InfoSessionVO.PERFIL).ToString() == "1")
        {
            lblCodigoAdmin.Text = " ";
        }
        else
        {
            lblCodigoAdmin.Text = infoSession.getValor(InfoSessionVO.CODIGOUSUARIOADMIN).ToString();
        }
    }
Esempio n. 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            String error = Utilis.validaPermisos(Session, NUMFUNCION);
            if (!error.Equals(""))
            {
                Response.Redirect(error);
            }

            error = Utilis.validaPermisos(Session, NUMFUNCION); // Se valida que el usuario tiene el permiso para Seguimiento
            //if (!error.Equals(""))
            //{
            //    lnkSeguimiento.Visible = false;
            //}

            //lstUnidadMedida.SelectedValue = "PZA";
            if (!Page.IsPostBack)
            {
                divCosto.Visible        = false;
                divRentabilidad.Visible = false;
            }
        }
        catch (Exception ex)
        {
        }
    }
Esempio n. 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Web.UI.ScriptManager.GetCurrent(this).RegisterPostBackControl(btnPolizaP);
        //scriptManager.RegisterPostBackControl(this.lblbtndoc1);
        // SEGURIDAD
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        InfoSessionVO infoSession = (InfoSessionVO)Session["InfoSession"];

        intUsuarioId = Int32.Parse(infoSession.getValor(InfoSessionVO.USUARIOID).ToString());

        if (IsPostBack)
        {
            dgvPanelEmpDetP.DataBind();
            dgvPanelEmpleadoP.DataBind();
            dvgPanelRPP.DataBind();
            dvgPanelDeptoP.DataBind();
            //UpdatePanel1.Update();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            String error = Utilis.validaPermisos(Session, NUMFUNCION);
            if (!error.Equals(""))
            {
                Response.Redirect(error);
            }
            error = Utilis.validaPermisos(Session, NUMFUNCION);

            string fecha = DateTime.Now.ToShortDateString();
            // DateTime fecha = Convert.ToDateTime(((HiddenField)Master.FindControl("hdnDate")).Value);
            //txtRechargeDate.Text = fecha;
            do
            {
                id_perfil = GenerarIdperfil();
            } while (Validar_IdPerfil(id_perfil) != 0);
            if (!Page.IsPostBack)
            {
                refreshdata();
            }
        }
        catch (Exception ex)
        {
        }
    }
Esempio n. 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // SEGURIDAD Acceso a Visitas Ventas
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }



        if (!Page.IsPostBack)
        {
            try
            {
                lblUsuario.Text = Session["usuarioID"].ToString();
            }
            catch (Exception ee)
            {
                Response.Redirect("~/Seguridad/Login.aspx");
            }

            Boolean blnPerfilAdministradorVisitas = false;
            Boolean blnPerfilSupervisorVisitas    = false;
            Boolean blnPerfilAgenteVisitas        = false;

            // determinar si el usuario tiene los permisos como administrador de Visitas Ventas.
            String error2 = Utilis.validaPermisos(Session, 36);
            if (error2.Equals(""))
            {
                blnPerfilAdministradorVisitas     = true;
                lblEtiquetaAgentes.Visible        = true;
                lstAgentes.Visible                = true;
                ObjectDataSource2.EnableViewState = true;
                //lblUsuario.Text = "-1";
            }

            // determinar si el usuario tiene los permisos como supervisor de Visitas Ventas.
            error2 = Utilis.validaPermisos(Session, 37);
            if (error2.Equals(""))
            {
                blnPerfilSupervisorVisitas        = true;
                lblEtiquetaAgentes.Visible        = true;
                lstAgentes.Visible                = true;
                ObjectDataSource2.EnableViewState = true;
            }

            // determinar si el usuario tiene los permisos como Agente de Visitas Ventas.
            error2 = Utilis.validaPermisos(Session, 38);
            if (error2.Equals(""))
            {
                blnPerfilAgenteVisitas = true;
            }
        }
    }
Esempio n. 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int usuarioID = 0;
        int oficinaID = 0;

        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        if (Session["usuarioID"] == null)
        {
            InfoSessionVO infoSession;
            infoSession          = (InfoSessionVO)Session["InfoSession"];
            usuarioID            = (int)infoSession.getValor(InfoSessionVO.USUARIOID);
            Session["usuarioID"] = usuarioID;
        }

        if (Session["usuarioIDCotizacion"] == null)
        {
            Session["usuarioIDCotizacion"] = Session["usuarioID"];
        }

        if (Session["nombreCompleto"] != null)
        {
            lblUsuario.Text = Session["nombreCompleto"].ToString();
        }

        if (Session["oficinaId"] == null)
        {
            InfoSessionVO infoSession;
            infoSession          = (InfoSessionVO)Session["InfoSession"];
            oficinaID            = (int)infoSession.getValor(InfoSessionVO.OFICINA);
            Session["oficinaID"] = oficinaID;
        }
        // valida si el usuario tiene el permiso para cotizar con otro usuario
        String error2 = Utilis.validaPermisos(Session, 16);

        if (!error2.Equals(""))
        {
            lblAgentes.Enabled        = false;
            lstAgentes.Enabled        = false;
            lblUsuarioAlterno.Enabled = false;
            //ObjectDataSource2 = false;
            lblAgentes.Visible        = false;
            lstAgentes.Visible        = false;
            lblUsuarioAlterno.Visible = false;
        }

        if (Session["usuarioNombreCotizacion"] != null)
        {
            lblUsuarioAlterno.Text = Session["usuarioNombreCotizacion"].ToString();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        lstAutorizaRemision.Attributes.Add("onchange", "javascript:confirm_message()");

        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.saludo = "hola";

        try
        {
            String error = Utilis.validaPermisos(Session, NUMFUNCION);
            if (!error.Equals(""))
            {
                Response.Redirect(error);
            }
            error = Utilis.validaPermisos(Session, NUMFUNCION);
            if (!Page.IsPostBack)
            {
                fa          = String.IsNullOrEmpty(Request.QueryString["fecha_alta"]) ? "" : Request.QueryString["fecha_alta"].ToString();
                rfc         = String.IsNullOrEmpty(Request.QueryString["rfc"]) ? "" : Request.QueryString["rfc"].ToString();
                id_empresa  = String.IsNullOrEmpty(Request.QueryString["id_empresa"]) ? "" : Request.QueryString["id_empresa"].ToString();
                id_perfil   = String.IsNullOrEmpty(Request.QueryString["id_perfil"]) ? "" : Request.QueryString["id_perfil"].ToString();
                comentarios = String.IsNullOrEmpty(Request.QueryString["imprimir"]) ? "" : Request.QueryString["imprimir"].ToString();

                System.Diagnostics.Debug.WriteLine("Fecha_Alta: " + fa.ToString());
                System.Diagnostics.Debug.WriteLine("RFC: " + rfc);
                System.Diagnostics.Debug.WriteLine("Id_empresa: " + id_empresa);
                System.Diagnostics.Debug.WriteLine("id_perfil: " + id_perfil);
                System.Diagnostics.Debug.WriteLine("imprimir: " + comentarios);
                //ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('" + fa + "')", true);
                lbpaciente.Text    = Retornar_Nombre_Paciente(rfc);
                lblRFC.Text        = rfc;
                lbrazonsocial.Text = Retornar_RazonSocial(id_empresa);
                lbperfil.Text      = Retornar_Perfil(id_perfil);
                labfechaalta.Text  = fa;
                lblFecha.Text      = Retornar_Fecha(rfc, id_empresa, id_perfil);
                folio          = RetornarFolio(rfc, id_empresa, id_perfil, fa);
                lbfolio.Text   = folio;
                lbempresa.Text = Retornar_Empresa(id_perfil);
                telp.Text      = RetornarTelPaciente(rfc);
                // lbedad.Text = Retornar_Edad(rfc);

                edad_user   = Devolver_Edad(rfc);
                lbsexo.Text = Devolver_Sexo(rfc);

                fnaci.Text    = Retornar_Fecha_nacimiento(rfc);
                vendedor.Text = Retornar_Usernombre(Retornar_UserPerfil(id_perfil));
                //ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('" + edad_user + "')", true);
                lbedad.Text = edad_user.ToString() + " años";


                Llenado_Labels(id_perfil);
            }
        }
        catch (Exception ex)
        {
        }
    }
Esempio n. 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // SEGURIDAD
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        //txtAno.Text = System.DateTime.Now.ToString("yyyy");
    }
Esempio n. 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         // determinar si el usuario tiene los permisos como administrador de seguimiento a pedidos.
         String error2 = Utilis.validaPermisos(Session, 29);
         if (!error2.Equals(""))
         {
             GridView1.Columns[6].Visible = false;
         }
     }
 }
Esempio n. 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // SEGURIDAD
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        //lblCodigoProducto.Visible = true;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }


        lblUsuario.Text = Session["nombreCompleto"].ToString();

        datos = conteoPendientes.GetData(Int32.Parse(Session["usuarioID"].ToString()));
        if (datos.Rows.Count > 0)
        {
            lblPendientes.Text = datos.Rows[0]["conteoPendientes"].ToString();
        }

        try
        {
            datos = conteoPendientesMarca.GetData(Int32.Parse(Session["usuarioID"].ToString()), Int32.Parse(lstMarca.SelectedItem.Value));
            if (datos.Rows.Count > 0)
            {
                lblPendientesMarca.Text     = datos.Rows[0]["conteoPendientes"].ToString();
                lblEtiquetaPenMarca.Visible = true;
                lblPendientesMarca.Visible  = true;
            }
        }
        catch (NullReferenceException ex)
        {
            lblEtiquetaPenMarca.Visible = false;
            lblPendientesMarca.Visible  = false;
        }


        lblValorEstatus.Text = "";
        lblFecha.Text        = "";

        //--------------------------------

        InfoSessionVO infoSession;

        infoSession = (InfoSessionVO)Session["InfoSession"];
        if (infoSession.getValor(InfoSessionVO.PERFIL).ToString() == "2")
        {
            lnkbtnRegresar.PostBackUrl = "~/Cotizador/Cotizaciones.aspx";
        }
        else
        {
            lnkbtnRegresar.PostBackUrl = "~/Principal/Default.aspx";
        }
    }
    //int intConteo=0;
    //Boolean blnClienteComodin = false;
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }
        //Button2.Attributes.Add("onclick", "javascript:document.form1.btnTraeFecha.style.display='none';");
        //btnTFecha.Attributes.Add("onclick", "javascript:muestraCalendario();");

        //if (txtRazon.Text.Length != 0)
        //    {
        //    String strTemp = txtRazon.Text;
        //    txtRazon.Text = strTemp.Replace("%","");
        //    }
        //if (txtRFC.Text.Length != 0)
        //    {
        //    String strTemp = txtRFC.Text;
        //    txtRFC.Text = strTemp.Replace("%", "");
        //    }

        //hdCodigoUsuarioAdmin.Text = (String)((Int32.Parse((String)Session["Usuario_codigoUsuarioAdmin"])).ToString());

        btnContinuar.Visible     = false;
        btnHabilitaNuevo.Visible = false;
        //btnClienteComodin.Visible = false;

        lblMoneda.Visible        = false;
        lblTipoDocumento.Visible = false;
        lblDocumento.Visible     = false;
        //lblFecha.Visible = false;
        //lblArchivo.Visible = false;

        lstTipoCambio.Visible    = false;
        txtDocumento.Visible     = false;
        lstTipoDocumento.Visible = false;
        lstUnidadNegocio.Visible = false;
        lblunidadnegocio.Visible = false;
        //txtFechaDocumento.Visible = false;
        //fplArchivo.Visible = false;
        //btnSubir.Visible = false;


        if (IsPostBack)
        {
            //if (txtRazon.Text.Length != 0)
            //    txtRazon.Text = txtRazon.Text.Replace("%", "");
            //if (txtRFC.Text.Length != 0)
            //    txtRFC.Text = txtRFC.Text.Replace("%", "");
        }
    }
Esempio n. 20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Session["IdDoctor"] = null;
        }
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }
    }
    protected void ShopCartGrid_RowCreated(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //if (intEstatusCotizacion > 0)
            //{
            Button btnEditar = (Button)e.Row.FindControl("Button1");
            Button btnBorrar = (Button)e.Row.FindControl("Button2");

            btnEditar.Visible = false;
            btnBorrar.Visible = false;
            //}
        }

        if (e.Row.RowType == DataControlRowType.Footer)
        {
            String error1 = Utilis.validaPermisos(Session, 14);
            if (error1.Equals(""))
            {
                blnBanderaAceptaCotizacion = true;
            }

            // determinar si el usuario tiene los permisos para aceptar una cotizacion con descuento.
            String error2 = Utilis.validaPermisos(Session, 15);
            if (error2.Equals(""))
            {
                blnBanderaAceptaCotizacionDescuento = true;
            }

            Button btnRevision = (Button)e.Row.FindControl("Button6");
            btnRevision.Visible = false;

            //cotizacion con descuento, solo supervisores la pueden aceptar
            if (blnBanderaCotizacionDescuento && blnBanderaAceptaCotizacionDescuento)
            {
                btnRevision.Visible = true;
            }
            else if (!blnBanderaCotizacionDescuento && (blnBanderaAceptaCotizacion || blnBanderaAceptaCotizacionDescuento))  //cotizacion sin descuento
            {
                btnRevision.Visible = true;
            }
            else
            {
                ErrMessage.Text = "NO SE TIENEN LOS PERMISOS PARA ACEPTAR UNA COTIZACION";
                if (blnBanderaCotizacionDescuento)
                {
                    ErrMessage.Text += " CON DESCUENTO.";
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            String error = Utilis.validaPermisos(Session, NUMFUNCION);
            if (!error.Equals(""))
            {
                Response.Redirect(error);
            }
            error = Utilis.validaPermisos(Session, 50);
            if (!Page.IsPostBack)
            {
                refreshdata();
                nombre_paciente = String.IsNullOrEmpty(Request.QueryString["rfc"]) ? "" : Request.QueryString["rfc"].ToString();
                nombre_empresa  = String.IsNullOrEmpty(Request.QueryString["id_empresa"]) ? "" : Request.QueryString["id_empresa"].ToString();
                nombre_perfil   = String.IsNullOrEmpty(Request.QueryString["id_perfil"]) ? "" : Request.QueryString["id_perfil"].ToString();

                txtpaciente.Text  = Retornar_Nombre_Paciente(nombre_paciente);
                txtrfc.Text       = nombre_paciente;
                txtempresa.Text   = Retornar_Nombre_Empresa(nombre_empresa);
                txtperfil.Text    = Retornar_Perfil(nombre_perfil);
                txtfechaAlta.Text = Retornar_Fecha(nombre_paciente, nombre_empresa, nombre_perfil);
                folio             = RetornarFolio(nombre_paciente, nombre_empresa, nombre_perfil);
                labfolio.Text     = folio;
                using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["cotizadorCS"].ToString()))
                {
                    using (SqlCommand cmd = new SqlCommand("select id_examen from TU_PER_CAT_DETALLEPERFIL where id_perfil= '" + nombre_perfil + "'", con))
                    {
                        con.Open();
                        SqlDataReader dr = cmd.ExecuteReader();
                        while (dr.Read())
                        {
                            foreach (GridViewRow gvrow in GridView1.Rows)
                            {
                                var checkbox = gvrow.FindControl("CheckBox1") as CheckBox;
                                var lblID    = gvrow.FindControl("Label1") as Label;
                                if (lblID.Text == dr["id_examen"].ToString())
                                {
                                    checkbox.Checked = true;
                                }
                            }//fin foreach
                        }
                        con.Close();
                    }
                }
            }
        }
        catch (Exception ex)
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        if (Request["perfilid"] != null && !IsPostBack)
        {
            cargaDatosActualiza();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // SEGURIDAD Acceso a Visitas Ventas
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        Boolean blnPerfilAdministradorVisitas = false;
        Boolean blnPerfilSupervisorVisitas    = false;
        Boolean blnPerfilAgenteVisitas        = false;

        if (!Page.IsPostBack)
        {
            lblAgente.Text = Session["usuarioID"].ToString();

            // determinar si el usuario tiene los permisos como administrador de Visitas Ventas.
            String error2 = Utilis.validaPermisos(Session, 36);
            if (error2.Equals(""))
            {
                blnPerfilAdministradorVisitas = true;
                lblTipoUsuario.Text           = "0";
                lstAgente.Visible             = true;
                odsAgentes.EnableViewState    = true;
                lblEtiAgente.Visible          = true;
            }

            // determinar si el usuario tiene los permisos como supervisor de Visitas Ventas.
            error2 = Utilis.validaPermisos(Session, 37);
            if (error2.Equals(""))
            {
                blnPerfilSupervisorVisitas = true;
                lblTipoUsuario.Text        = "1";
                lstAgente.Visible          = true;
                odsAgentes.EnableViewState = true;
                lblEtiAgente.Visible       = true;
            }

            // determinar si el usuario tiene los permisos como Agente de Visitas Ventas.
            error2 = Utilis.validaPermisos(Session, 38);
            if (error2.Equals(""))
            {
                blnPerfilAgenteVisitas = true;
                lblTipoUsuario.Text    = "2";
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }
        if (Session["perfilID"] == null)
        {
            InfoSessionVO infoSession = (InfoSessionVO)Session["InfoSession"];
            int           intPerfil   = Int32.Parse(infoSession.getValor(InfoSessionVO.PERFIL).ToString());
            Session["perfilID"] = intPerfil;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        //if (gvListadoOrdenesCompra.Rows.Count == 0)
        //{
        //    mostrarCamposBusqueda(false);
        //    Response.Redirect("formularioOrdenCompra.aspx");
        //}
    }
Esempio n. 27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         String error = Utilis.validaPermisos(Session, NUMFUNCION);
         if (!error.Equals(""))
         {
             Response.Redirect(error);
         }
         error = Utilis.validaPermisos(Session, NUMFUNCION); // Se valida que el usuario tiene el permiso para Seguimiento
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            String error = Utilis.validaPermisos(Session, NUMFUNCION);
            plaza = this.Session["ubicacion"].ToString();
            if (!error.Equals(""))
            {
                Response.Redirect(error);
            }
            if (!Page.IsPostBack)
            {
                IniciarLllenadoDropDown();
                folio      = String.IsNullOrEmpty(Request.QueryString["folio"]) ? "" : Request.QueryString["folio"].ToString();
                fa         = String.IsNullOrEmpty(Request.QueryString["fecha_alta"]) ? "" : Request.QueryString["fecha_alta"].ToString();
                rfc        = String.IsNullOrEmpty(Request.QueryString["rfc"]) ? "" : Request.QueryString["rfc"].ToString();
                id_empresa = String.IsNullOrEmpty(Request.QueryString["id_empresa"]) ? "" : Request.QueryString["id_empresa"].ToString();
                id_perfil  = String.IsNullOrEmpty(Request.QueryString["id_perfil"]) ? "" : Request.QueryString["id_perfil"].ToString();

                string val_c = Retornar_Value(id_empresa);
                int    val_p = RetornarConjuntoPerf(id_empresa, id_perfil);
                txtfolio.Text             = folio;
                txtfecha.Text             = fa;
                txtrfc.Text               = rfc;
                txtnombre.Text            = RetornarTPRP(RetornarCP(folio, "RFC"), "Nombre");
                txtapaterno.Text          = RetornarTPRP(RetornarCP(folio, "RFC"), "Apaterno");
                txtmaterno.Text           = RetornarTPRP(RetornarCP(folio, "RFC"), "Amaterno");
                fnac.Text                 = String.Format("{0:dd/MM/yyyy}", RetornarFN(RetornarCP(folio, "RFC")));
                listgenero.SelectedIndex  = Convert.ToInt32(RetornarTPRP(RetornarCP(folio, "RFC"), "Sexo"));
                ListEstatus.SelectedValue = RetornarCP(folio, "ESTATUS");


                empresa.SelectedIndex = Int32.Parse(val_c);
                ValueList();
                perfil.SelectedIndex = val_p;

                txttelefono.Text = RetornarTPRP(RetornarCP(folio, "RFC"), "Telefono");
                txtvendedor.Text = Retornar_Usernombre(Retornar_UserPerfil(id_perfil));

                fecha_de_alta = String.Format("{0:yyyy-MM-dd HH:mm:ss}", fa);
            }

            error = Utilis.validaPermisos(Session, NUMFUNCION); // Se valida que el usuario tiene el permiso para Seguimiento
        }
        catch (Exception ex)
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        String error2 = Utilis.validaPermisos(Session, 43);

        if (error2.Equals(""))
        {
            GridView1.Columns[9].Visible = true;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        if (Request["usuarioId"] != null && !IsPostBack)
        {
            cargaDatosActualiza();
        }
        OtrosUsuario.Visible = false;
        //String carpetaEmpresa = "C:/Compacw/Empresas/CALVEK";
        //long prueba = 0;
        //String lNombreAgente = "";
        //String lCodigoAgente = "";

        //int index = 0;
        //String cadena = "";

        //saludo nuevo = new saludo();
        //nuevo.fInicializaSDKW();
        //nuevo.fAbreEmpresaW(carpetaEmpresa);
        //prueba = nuevo.fPosPrimerAgenteW();

        //while (prueba == 0)
        //    {
        //        prueba = nuevo.fLeeDatoAgenteW("cCodigoA01", lCodigoAgente, 30);
        //        cadena = cadena + "<BR>" + index + ": " + lCodigoAgente;
        //        prueba = nuevo.fLeeDatoAgenteW("cNombreA01", lNombreAgente, 60);

        //        listUsuarioAdmin.Items.Add(new ListItem(lNombreAgente, lCodigoAgente));

        //        lCodigoAgente = "";
        //        lNombreAgente = "";

        //        prueba = nuevo.fPosSiguienteAgenteW();
        //        index++;
        //    }

        //    comodin.Text = "<BR>Codigos Agente: " + cadena;

        //nuevo.fCierraEmpresaW();
        //nuevo.fTerminaSDKW();
    }