コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {

            PreparacionDeJornada();

            Turno T = null;
            if (Request["IDT"] != null) 
            {
                T = Turno.GetTurnoByID(int.Parse(Request["IDT"].ToString()));
            }

            if (Request["com"]!=null)
            {
                if (T != null)
                {
                    if (Request["com"] == "I")
                    {
                        T.ComenzarTurno();
                        string GUI = T.Pac.GUID;
                        Response.Redirect("/Historia-Clinica?m=s&gui=" + GUI);
                    }
                    if (Request["com"] == "C") { 
                        T.CancelarTurno();
                        Response.Redirect("/Turnos");
                    }
                    if (Request["com"] == "F")
                    {
                        T.FinalizarTurno();
                        Response.Redirect("/Turnos");
                    }
                    
                }
            }

            

            List<Turno> LT = Turno.GetTurnosByUser(UserId);
            if (LT != null)
            {
                //ConnectionDispensario.Statics.LogCatcher.AddLog("Hay Session", "", this, Session);
                Session.Add(SessionTurnos, LT);
            }
            else 
            {
                Session.Remove(SessionTurnos);
            }
            
            try
            {

            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }