Beispiel #1
0
        private void llenarComboRepresentanteSinCasilla(int tipusu, string tipoUsuarioActual)
        {
            try
            {
                WN_Combos Datos = new WN_Combos {
                    CadenaConexion = Comun.Conexion, Parametro01Int = tipusu
                };
                WN_CombosNegocio GN = new WN_CombosNegocio();

                if (tipoUsuarioActual == "101" || tipoUsuarioActual == "201")
                {
                    cmbSuplente.DataSource     = GN.ObtenerComboRepresentanteSinCasilla(Datos);
                    cmbSuplente.DataValueField = "ID";
                    cmbSuplente.DataTextField  = "Nombre";
                    cmbSuplente.DataBind();
                }
                else if (tipoUsuarioActual == "200" || tipoUsuarioActual == "300")
                {
                    cmbAsignado.DataSource     = GN.ObtenerComboRepresentanteSinCasilla(Datos);
                    cmbAsignado.DataValueField = "ID";
                    cmbAsignado.DataTextField  = "Nombre";
                    cmbAsignado.DataBind();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public DataTable ObtenerComboSeccionesXMunicipio(WN_Combos Datos)
        {
            DataSet ds;

            ds = SqlHelper.ExecuteDataset(Datos.CadenaConexion, "WN_spCSLDB_get_Combos", 13, "", Datos.Parametro01Int);
            if (ds != null)
            {
                if (ds.Tables[0] != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        return(ds.Tables[0]);
                    }
                }
            }
            return(null);
        }
        public DataTable ObtenerComboRepresentanteSinCasilla(WN_Combos Datos)
        {
            DataSet ds;

            ds = SqlHelper.ExecuteDataset(Datos.CadenaConexion, "WN_spCSLDB_get_Combos", 14, "", Datos.Parametro01Int);
            if (ds != null)
            {
                if (ds.Tables[0] != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        return(ds.Tables[0]);
                    }
                }
            }
            return(null);
        }
        public DataTable ObtenerComboTipoUsuario(WN_Combos Datos)
        {
            DataSet ds;

            ds = SqlHelper.ExecuteDataset(Datos.CadenaConexion, "WN_spCSLDB_get_Combos", 6, "", 0);
            if (ds != null)
            {
                if (ds.Tables[0] != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        return(ds.Tables[0]);
                    }
                }
            }
            return(null);
        }
        public DataTable ObtenerComboCasillasXSeccion(WN_Combos Datos)
        {
            DataSet ds;

            ds = SqlHelper.ExecuteDataset(Datos.CadenaConexion, "WN_spCSLDB_get_Combos", 5, Datos.Parametro01String, 0);
            if (ds != null)
            {
                if (ds.Tables[0] != null)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        return(ds.Tables[0]);
                    }
                }
            }
            return(null);
        }
Beispiel #6
0
 private void llenarComboSuplente(int tipusu)
 {
     try
     {
         WN_Combos Datos = new WN_Combos {
             CadenaConexion = Comun.Conexion, Parametro01Int = tipusu
         };
         WN_CombosNegocio GN = new WN_CombosNegocio();
         cmbSuplente.DataSource     = GN.ObtenerComboSuplente(Datos);
         cmbSuplente.DataValueField = "ID";
         cmbSuplente.DataTextField  = "Nombre";
         cmbSuplente.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #7
0
 private void llenarComboSeccionesXIDJefe(string padre)
 {
     try
     {
         WN_Combos Datos = new WN_Combos {
             CadenaConexion = Comun.Conexion, Parametro01String = padre
         };
         WN_CombosNegocio GN = new WN_CombosNegocio();
         cmbSeccion.DataSource     = GN.ObtenerComboSeccionesXJefe(Datos);
         cmbSeccion.DataValueField = "ID";
         cmbSeccion.DataTextField  = "Nombre";
         cmbSeccion.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #8
0
 private void llenarComboCasillas(string casilla)
 {
     try
     {
         WN_Combos Datos = new WN_Combos {
             CadenaConexion = Comun.Conexion, Parametro01String = casilla
         };
         WN_CombosNegocio GN = new WN_CombosNegocio();
         cmbCasilla.DataSource     = GN.ObtenerComboCasillasXSeccion(Datos);
         cmbCasilla.DataValueField = "ID";
         cmbCasilla.DataTextField  = "Nombre";
         cmbCasilla.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #9
0
 private void llenarComboSecciones()
 {
     try
     {
         WN_Combos Datos = new WN_Combos {
             CadenaConexion = Comun.Conexion
         };
         WN_CombosNegocio GN = new WN_CombosNegocio();
         cmbSeccion.DataSource     = GN.ObtenerComboSecciones(Datos);
         cmbSeccion.DataValueField = "ID";
         cmbSeccion.DataTextField  = "Nombre";
         cmbSeccion.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #10
0
        public void CargarComboTipoUsuario()
        {
            try
            {
                WN_Combos Datos = new WN_Combos {
                    CadenaConexion = Comun.Conexion
                };
                WN_CombosNegocio CN = new WN_CombosNegocio();

                cmbTipoUsuario.DataSource     = CN.ObtenerComboTipoUsuario(Datos);
                cmbTipoUsuario.DataValueField = "ID";
                cmbTipoUsuario.DataTextField  = "Nombre";
                cmbTipoUsuario.DataBind();
                cmbTipoUsuario.Items.Insert(0, new ListItem("-Seleccione-", "0"));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #11
0
        private void llenarComboPadre(int tipusu, string tipoUsuarioActual)
        {
            try
            {
                WN_Combos Datos = new WN_Combos {
                    CadenaConexion = Comun.Conexion, Parametro01Int = tipusu
                };
                WN_CombosNegocio GN = new WN_CombosNegocio();
                cmbAsignado.DataSource     = GN.ObtenerComboPadre(Datos);
                cmbAsignado.DataValueField = "ID";
                cmbAsignado.DataTextField  = "Nombre";
                cmbAsignado.DataBind();

                //remuevo el --seleccione--
                if (tipoUsuarioActual == "100")
                {
                    cmbAsignado.Items.RemoveAt(0);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #12
0
        public DataTable ObtenerComboCasillasXSeccion(WN_Combos Datos)
        {
            WN_CombosDatos CD = new WN_CombosDatos();

            return(CD.ObtenerComboCasillasXSeccion(Datos));
        }
Beispiel #13
0
        public DataTable ObtenerComboSuplente(WN_Combos Datos)
        {
            WN_CombosDatos CD = new WN_CombosDatos();

            return(CD.ObtenerComboSuplente(Datos));
        }
Beispiel #14
0
        public DataTable ObtenerComboRepresentanteSinCasilla(WN_Combos Datos)
        {
            WN_CombosDatos CD = new WN_CombosDatos();

            return(CD.ObtenerComboRepresentanteSinCasilla(Datos));
        }
Beispiel #15
0
        public DataTable ObtenerComboCasillaXIDJefe(WN_Combos Datos)
        {
            WN_CombosDatos CD = new WN_CombosDatos();

            return(CD.ObtenerComboCasillaXIDJefe(Datos));
        }
Beispiel #16
0
        public DataTable ObtenerComboMunicipios(WN_Combos Datos)
        {
            WN_CombosDatos CD = new WN_CombosDatos();

            return(CD.ObtenerComboMunicipios(Datos));
        }
Beispiel #17
0
        public DataTable ObtenerComboSecciones(WN_Combos Datos)
        {
            WN_CombosDatos CD = new WN_CombosDatos();

            return(CD.ObtenerComboSecciones(Datos));
        }
Beispiel #18
0
        public DataTable ObtenerComboTipoUsuario(WN_Combos Datos)
        {
            WN_CombosDatos CD = new WN_CombosDatos();

            return(CD.ObtenerComboTipoUsuario(Datos));
        }