Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                HiddenField hdMaster = (HiddenField)Master.FindControl("hdToken");
                hdMaster.Value = Request.QueryString["r"];
                PacienteDao oPaciente  = new PacienteDao();
                ReservaDao  reservaDao = new ReservaDao();
                String      Rut;
                String      cadena;
                string[]    decript   = Utilidades.Seguridad.DesEncriptarSap(hdMaster.Value, out cadena);
                String      RutMaster = decript[3];
                if (decript.Length > 6)
                {
                    Rut = decript[6];

                    HiddenField hdtipo = (HiddenField)Master.FindControl("hdTipo");
                    hdtipo.Value = "V";
                }
                else
                {
                    Rut = decript[3];
                }
                ViewState["Rut"] = Rut;
                List <Cita> lst = new List <Cita>();
                lst = reservaDao.GetCitaHistorica(Rut, "01012013", DateTime.Now.AddDays(-1).ToString("ddMMyyyy"));
                ViewState["lstHistorico"] = lst;
                grdHistorico.DataSource   = lst;
                grdHistorico.DataBind();
                Literal litPag = (Literal)Master.FindControl("litPag1");
                litPag.Text = "Cita Histórica >";
            }
        }
Пример #2
0
        protected void LinkButton4_Click(object sender, EventArgs e)
        {
            ReservaDao reservaDao = new ReservaDao();

            reservaDao.delCita((String)ViewState["CodCita"]);
            grdHistorico.DataSource = reservaDao.GetCitaHistorica((String)ViewState["Rut"], DateTime.Now.ToString("ddMMyyyy"), "31122999");
            grdHistorico.DataBind();
            pnAnular.Visible = false;
            //LinkButton3_ModalPopupExtender.Hide();
        }