Exemplo n.º 1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            string permiteReportes   = System.Configuration.ConfigurationSettings.AppSettings["Server"];
            string dirServerReportes = System.Configuration.ConfigurationSettings.AppSettings["DirServerReportes"];

            if (permiteReportes == "P")
            {
                // si no permite reportes, entonces redirecciona al servidor de reportes
                string pass = Session["Pass"] != null ? Session["Pass"].ToString() : "";
                Response.Redirect(dirServerReportes + "Redirecciona.aspx?LoginRedir=" + this.UsuarioConectadoID + "&p=" + pass + "&Pagina=ReporteGuiasPorAgenciaCliente.aspx");
            }

            if (User.Identity.IsAuthenticated)
            {
                //this.SetCultura();
                string sOpcion = "reporteRetirosEntregas";
                Menu   oMenu   = (Menu)this.FindControl("Menu1");
                this.ValidarSeguridad(oMenu, sOpcion);
            }

            this.SetearValidadores();
            if (!Page.IsPostBack)
            {
                LlenarCombos.AgenciasTodas(this.ddlAgencias, this.UnidadNegocioID);
                //BindGrid(0);
            }
        }
 private void LlenarListas()
 {
     LlenarCombos.AgenciasTodas(this.lstAgencias);
     LlenarFechas(this.lstFechaEmision);
     LlenarFechas(this.lstFechaConformacion);
     LlenarFechas(this.lstFechaRecepcion);
     LlenarFechas(this.lstFechaControl);
     LlenarCombos.AgrupacionAgencia(this.lstZona, usuario.UsuarioID);
     LlenarCombos.Ejecutivos(this.lstEjecutivoCuentas);
 }
 protected void chkZonaAg_CheckedChanged(object sender, EventArgs e)
 {
     if (chkZonaAg.Checked)
     {
         LlenarCombos.Zonas(lstAgOrigen, this.UnidadNegocioID);
     }
     else
     {
         LlenarCombos.AgenciasTodas(this.lstAgOrigen);
     }
 }
        private void CargarCombos()
        {
            LlenarCombos.AgenciasTodas(this.lstAgOrigen);
            lstUnidadVenta.Items.Clear();
            lstUnidadVenta.DataSource     = IoC.GetObjectDominio <IUnidadVentaDominio>().GetListActivos();
            lstUnidadVenta.DataTextField  = "UnidadVentaDescrip";
            lstUnidadVenta.DataValueField = "UnidadVentaID";
            lstUnidadVenta.DataBind();

            lstServicio.Items.Clear();
            lstServicio.DataSource     = IoC.GetObjectDominio <IServiciosDominio>().GetListActivos();
            lstServicio.DataTextField  = "ServicioDescrip";
            lstServicio.DataValueField = "ServicioID";
            lstServicio.DataBind();



            //Agencia a = IoC.GetObjectDominio<IAgenciaDominio>().GetOne(183);
        }
        private void LlenarListas()
        {
            //LlenarCombos.Clientes(this.lstClientes, this.UnidadNegocioID);
            /* Diego M 02/07/2012  cambio para no ver clientes duplicados*/
            LlenarCombos.ClientesCombos(this.lstClientes, this.UnidadNegocioID);
            if (this.tAlertasPorBolsin.Visible)
            {
                LlenarCombos.UnidadesVentasBolsin(this.lstUnidadesVenta);
            }

            if (this.tAlertasPorRestoUV.Visible)
            {
                LlenarCombos.UnidadesVentasSinBolsin(this.lstUnidadesVenta);
            }

            LlenarCombos.AgrupacionAgencia(this.lstZonas, usuario.UsuarioID);
            //LlenarCombos.Categoria(this.lstCatCliente, (int)NegociosSisPackInterface.SisPack.TipoCategoria.Cliente);
            LlenarCombos.CategoriaUVenta(this.lstCatUnidadVenta);
            //LlenarCombos.Ejecutivos(this.lstPersonal);
            LlenarCombos.AgenciasTodas(this.lstAgenciasTrasbordo);
            LlenarCombos.AgenciasTodas(this.lstAgenciasOrigen);
            LlenarCombos.AgenciasTodas(this.lstAgenciasDestino);
        }
Exemplo n.º 6
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (Session["Usuario"] != null)
            {
                usuario = (IUsuarios)Session["Usuario"];
            }


            if (User.Identity.IsAuthenticated)
            {
                //this.SetCultura();
                string       sOpcion = "ReporteRendicionAgUsuario";
                SisPacK.Menu oMenu   = (SisPacK.Menu) this.FindControl("Menu1");
                this.ValidarSeguridad(oMenu, sOpcion);
                //string script = "window.document.getElementById('" + this.txtConsultar.ClientID + "').value='N';";
                //this.butConsultar.Attributes.Add("onclick", script);
                //this.ddlAgrupado.Attributes.Add("onchange", "OcultaResumido();");
            }

            // Page.RegisterStartupScript("init", SisPackController.GenerarJavaScripts.SetearFocoControl(this.lstProductos.ClientID));

            /*			this.hgFechaEmision.AllowPaging = false;
             *          this.hgUnidadVenta.AllowPaging = false;
             *          this.hgAgenciaDestino.AllowPaging = false;
             *          this.hgAgenciaOrigen.AllowPaging = false;*/

            if (!IsPostBack)
            {
                Session["dsGuias"] = null;
                //Session["dsAgencias"] = null;

                /*Session["DsListado"] = null;
                 * this.txtOrdenCriterio.Text = "NroGuia";
                 * this.txtOrdenDireccion.Text = "ASC";
                 * this.txtSolapa.Text = "SinAgrupar";*/
                LlenarCombos.AgenciasTodas(this.ddlAgencias, this.UnidadNegocioID);
            }

            /*if (Page.IsPostBack && this.txtConsultar.Text != "S")
             * {
             *  Session["dsUnidadesVenta"] = null;
             *  Session["dsGuiasTDE"] = null;
             *  Session["dsAgencias"] = null;
             * }*/

            //es para cuando pagina

            /*if (Page.IsPostBack && this.txtConsultar.Text != "S")
             * {
             *  if (this.ddlAgrupado.SelectedValue == "3")//agencia destino
             *  {
             *      Session["resumido"] = false;
             *      this.BindGrillaAgenciaDestino();
             *  }
             *  else if (this.ddlAgrupado.SelectedValue == "2")//agencia origen
             *  {
             *      Session["resumido"] = false;
             *      this.BindGrillaAgenciaOrigen();
             *  }
             *  else if (this.ddlAgrupado.SelectedValue == "4")//unidad de venta
             *  {
             *      if (this.chkResumido.Checked)
             *          Session["resumido"] = true;
             *      else
             *          Session["resumido"] = false;
             *
             *      this.BindGrillaUnidadVenta();
             *  }
             *
             *  this.txtConsultar.Text = "S";
             * }*/
        }