protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var obec = ((BEParameters)Session["InitPar"]);

                caleInicio.Value    = new DateTime(DateTime.Now.Year, 1, 1);
                caleFin.Value       = new DateTime(DateTime.Now.Year, 12, 31);
                hffechaInicio.Value = ((DateTime)caleInicio.Value).ToString("dd/MM/yyyy");
                hffechaFin.Value    = ((DateTime)caleFin.Value).ToString("dd/MM/yyyy");
                var obep = new BEParameters()
                {
                    DateIn   = (DateTime)caleInicio.Value,
                    DateFi   = (DateTime)caleFin.Value,
                    Project  = "",
                    Socied   = obec.Socied,
                    UserName = obec.UserName,
                    CardCode = "0"
                };



                obrl = new BRLogin();
                List <BELogin> olst = obrl.Get_DS_SCSP_LSPJ_OPRJ(obep);

                var str = String.Join(",", olst.Select(p => p.PrjCode));
                obep.Project = str;

                Session["obep"] = obep;


                var seleccionar = new BELogin
                {
                    PrjName = "<Todos>",
                    PrjCode = "-"
                };
                olst.Add(seleccionar);

                navigateComboBox.DataSource    = olst;
                navigateComboBox.DropDownStyle = DevExpress.Web.ASPxEditors.DropDownStyle.DropDownList;
                navigateComboBox.DataBind();
                navigateComboBox.SelectedIndex = olst.Count() - 1;

                cargarDasboard(obep);
            }
        }
Exemple #2
0
        protected void UpdateButton_Click(object sender, EventArgs e)
        {
            BEParameters obep = (BEParameters)Session["obep"];

            if (navigateComboBox.Value.ToString() == "-")
            {
                obrl = new BRLogin();
                List <BELogin> olst = obrl.Get_DS_SCSP_LSPJ_OPRJ(obep);

                var str = String.Join(",", olst.Select(p => p.PrjCode));
                obep.Project = str;
            }
            else
            {
                obep.Project = navigateComboBox.Value.ToString();
            }
            obep.DateIn         = (DateTime)caleInicio.Value;
            obep.DateFi         = (DateTime)caleFin.Value;
            hffechaInicio.Value = ((DateTime)caleInicio.Value).ToString("dd/MM/yyyy");
            hffechaFin.Value    = ((DateTime)caleFin.Value).ToString("dd/MM/yyyy");
            cargarDasboard(obep);
        }