Beispiel #1
0
        public void cargarVehiculo()
        {
            var    user = HttpContext.Current.User.Identity.Name;
            string nit  = homeControl.obtenerNit(user);

            if (HttpContext.Current.User.IsInRole("SA"))
            {
                if (SitePrincipal.ExisteActiva())
                {
                    //var user = HttpContext.Current.User.Identity.Name;
                    //string nit = homeControl.obtenerNit(user);
                    cboplaca.DataSource     = controler.comboVehiculo(nit);
                    cboplaca.DataTextField  = "Patente";
                    cboplaca.DataValueField = "NroPlaca";
                    cboplaca.DataBind();
                    cboplaca.Items.Insert(0, "todas");
                }
                else
                {
                    cboplaca.DataSource     = vehiculoCtrl.cargarDetalleVehiculosSA();
                    cboplaca.DataTextField  = "Patente";
                    cboplaca.DataValueField = "NroPlaca";
                    cboplaca.DataBind();
                    cboplaca.Items.Insert(0, "todas");
                }
            }
            else
            {
                if (HttpContext.Current.User.IsInRole("SUPERVISOR"))
                {
                    //var user = HttpContext.Current.User.Identity.Name;
                    cboplaca.DataSource     = personaCtrl.ObtenerVehiculosAsociadosPersonal(user);
                    cboplaca.DataTextField  = "Patente";
                    cboplaca.DataValueField = "NroPlaca";
                    cboplaca.DataBind();
                    cboplaca.Items.Insert(0, "todas");
                }
                else
                {
                    //var user = HttpContext.Current.User.Identity.Name;
                    //string nit = homeControl.obtenerNit(user);
                    cboplaca.DataSource     = controler.comboVehiculo(nit);
                    cboplaca.DataTextField  = "Patente";
                    cboplaca.DataValueField = "NroPlaca";
                    cboplaca.DataBind();
                    cboplaca.Items.Insert(0, "todas");
                }
            }
        }
Beispiel #2
0
 public void cargarVehiculo()
 {
     if (SitePrincipal.ExisteActiva())
     {
         if (HttpContext.Current.User.IsInRole("SUPERVISOR"))
         {
             var user = HttpContext.Current.User.Identity.Name;
             gdvVehiculos.DataSource = personaCtrl.ObtenerVehiculosAsociadosPersonal(user);
             gdvVehiculos.DataBind();
         }
         else
         {
             var    user = HttpContext.Current.User.Identity.Name;
             string nit1 = homeCtrl.obtenerNit(user);
             gdvVehiculos.DataSource = seguimientoCtrl.comboVehiculo(nit1);
             gdvVehiculos.DataBind();
         }
     }
     else
     {
         if (HttpContext.Current.User.IsInRole("SA"))
         {
             gdvVehiculos.DataSource = vehiculoCtrl.cargarDetalleVehiculosSA();
             gdvVehiculos.DataBind();
         }
     }
 }
Beispiel #3
0
 public void cargarVehiculo()
 {
     if (HttpContext.Current.User.IsInRole("SA"))
     {
         cboplaca.DataSource     = vehiculoCtrl.cargarDetalleVehiculosSA();
         cboplaca.DataTextField  = "NroPlaca";
         cboplaca.DataValueField = "NroPlaca";
         cboplaca.DataBind();
         cboplaca.Items.Insert(0, "todas");
     }
     else
     {
         var    user = HttpContext.Current.User.Identity.Name;
         string nit  = homeControl.obtenerNit(user);
         cboplaca.DataSource     = controler.comboVehiculo(nit);
         cboplaca.DataTextField  = "NroPlaca";
         cboplaca.DataValueField = "NroPlaca";
         cboplaca.DataBind();
         cboplaca.Items.Insert(0, "todas");
     }
 }