Ejemplo n.º 1
0
        //SqlDataReader dr = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.TituloPagina        = "Informe de tareas propias";
            Master.bFuncionesLocales   = true;
            Master.nBotonera           = 12;
            Master.Botonera.ItemClick += new ToolBarEventHandler(this.Botonera_Click);
            Master.FicherosCSS.Add("PopCalendar/CSS/Classic.css");
            Master.FuncionesJavaScript.Add("PopCalendar/PopCalendar.js");

            Utilidades.SetEventosFecha(this.txtFecha);

            try
            {
                if (!Page.IsPostBack)
                {
                    Session["PANT_AVANZADO"]     = null; // BORRARIA LOS FILTROS DE OTRAS PANTALLAS ( POR SI NO DA AL BOTÓN REGRESAR )
                    Session["PANT_VENCIMIENTO"]  = null;
                    Session["PANT_AVANZADO_TAR"] = null;

                    txtFecha.Attributes.Add("readonly", "readonly");
                    txtArea.Attributes.Add("readonly", "readonly");

                    string strDia = DateTime.Today.Day.ToString();
                    if (strDia.Length == 1)
                    {
                        strDia = "0" + strDia;
                    }
                    string strMes = DateTime.Today.Month.ToString();
                    if (strMes.Length == 1)
                    {
                        strMes = "0" + strMes;
                    }
                    txtFecha.Text = strDia + "/" + strMes + "/" + DateTime.Today.Year.ToString();

                    cboSituacion.Items.Insert(0, new ListItem("", "3"));

                    cboRtado.Items.Insert(0, new ListItem("", "0"));
                    cboRtado.Items[0].Selected = true;

                    if (Session["PANT_PROPIAS_TAR"] != null)
                    {
                        System.Web.UI.Control Area = Master.FindControl("CPHC");
                        PonerValoresFiltros.Actualizar(Area.Controls, (Hashtable)Session["PANT_PROPIAS_TAR"]);
                        //Master.Botonera.Items[0].Enabled = true;
                        //Master.nBotonera = 12;
                    }
                }
            }
            catch (Exception ex)
            {
                Master.sErrores = Errores.mostrarError("Error al cargar la página", ex);
            }
        }
        //SqlDataReader dr = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.TituloPagina        = "Informe de órdenes por criterios avanzados";
            Master.bFuncionesLocales   = true;
            Master.nBotonera           = 9;
            Master.Botonera.ItemClick += new ToolBarEventHandler(this.Botonera_Click);
            Master.FicherosCSS.Add("PopCalendar/CSS/Classic.css");
            Master.FuncionesJavaScript.Add("PopCalendar/PopCalendar.js");
            Utilidades.SetEventosFecha(this.txtFechaInicio);
            Utilidades.SetEventosFecha(this.txtFechaFin);

            try
            {
                if (!Page.IsPostBack)
                {
                    Session["PANT_VENCIMIENTO"]  = null;
                    Session["PANT_PROPIAS_TAR"]  = null;
                    Session["PANT_AVANZADO_TAR"] = null;

                    txtFechaInicio.Attributes.Add("readonly", "readonly");
                    txtFechaFin.Attributes.Add("readonly", "readonly");
                    txtArea.Attributes.Add("readonly", "readonly");
                    txtEntrada.Attributes.Add("readonly", "readonly");
                    txtAlcance.Attributes.Add("readonly", "readonly");
                    txtTipo.Attributes.Add("readonly", "readonly");
                    txtProducto.Attributes.Add("readonly", "readonly");
                    txtRequisito.Attributes.Add("readonly", "readonly");
                    txtCausa.Attributes.Add("readonly", "readonly");
                    txtProveedor.Attributes.Add("readonly", "readonly");
                    txtCliente.Attributes.Add("readonly", "readonly");
                    txtCR.Attributes.Add("readonly", "readonly");
                    hdnFechaInicio.Text = "01/01/" + DateTime.Today.Year.ToString();
                    string strDia = DateTime.Today.Day.ToString();
                    if (strDia.Length == 1)
                    {
                        strDia = "0" + strDia;
                    }
                    string strMes = DateTime.Today.Month.ToString();
                    if (strMes.Length == 1)
                    {
                        strMes = "0" + strMes;
                    }
                    hdnFechaFin.Text = strDia + "/" + strMes + "/" + DateTime.Today.Year.ToString();
                    cboRtado.Items.Insert(0, new ListItem("", "0"));
                    cboRtado.Items[0].Selected = true;

                    cboImportancia.Items.Insert(0, new ListItem("", "0"));
                    cboImportancia.Items[0].Selected = true;

                    cboPrioridad.Items.Insert(0, new ListItem("", "0"));
                    cboPrioridad.Items[0].Selected = true;

                    if (Session["PANT_AVANZADO"] != null)
                    {
                        System.Web.UI.Control Area = Master.FindControl("CPHC");
                        PonerValoresFiltros.Actualizar(Area.Controls, (Hashtable)Session["PANT_AVANZADO"]);
                        //Master.Botonera.Items[0].Enabled = true;
                        Master.nBotonera = 12;
                    }
                }
            }
            catch (Exception ex)
            {
                Master.sErrores = Errores.mostrarError("Error al cargar la página", ex);
            }
        }