Пример #1
0
    protected void Page_Init(object sender, EventArgs e)
    {
        ctx = new AriClinicContext("AriClinicContext");
        // security control, it must be a user logged
        if (Session["User"] == null)
        {
            Response.Redirect("Default.aspx");
        }
        else
        {
            user = (User)Session["User"];
            user = CntAriCli.GetUser(user.UserId, ctx);
            Process proc = (from p in ctx.Processes
                            where p.Code == "examinationassigned"
                            select p).FirstOrDefault <Process>();
            per = CntAriCli.GetPermission(user.UserGroup, proc, ctx);
            btnAccept.Visible = per.Modify;
        }

        //
        if (Request.QueryString["CycloplegiaId"] != null)
        {
            id            = Int32.Parse(Request.QueryString["CycloplegiaId"]);
            Cycloplegia   = CntAriCli.GetCycloplegia(id, ctx);
            refractometry = Cycloplegia.Refractometry;
            LoadData(Cycloplegia);
        }
        if (Request.QueryString["RefractometryId"] != null)
        {
            id            = int.Parse(Request.QueryString["RefractometryId"]);
            refractometry = (Refractometry)CntAriCli.GetExaminationAssigned(id, ctx);
        }
    }
Пример #2
0
    protected void Page_Init(object sender, EventArgs e)
    {
        ctx = new AriClinicContext("AriClinicContext");
        // security control, it must be a user logged
        if (Session["User"] == null)
        {
            Response.Redirect("Default.aspx");
        }
        else
        {
            user = (User)Session["User"];
            user = CntAriCli.GetUser(user.UserId, ctx);
            Process proc = (from p in ctx.Processes
                            where p.Code == "examinationassigned"
                            select p).FirstOrDefault <Process>();
            per = CntAriCli.GetPermission(user.UserGroup, proc, ctx);
            btnAccept.Visible = per.Modify;
        }

        //
        if (Request.QueryString["ExaminationAssignedId"] != null)
        {
            examinationAssignedId = Int32.Parse(Request.QueryString["ExaminationAssignedId"]);
            paquimetry            = (Paquimetry)CntAriCli.GetExaminationAssigned(examinationAssignedId, ctx);
            LoadData(paquimetry);
        }
        else
        {
            rdpExaminationDate.SelectedDate = DateTime.Now;
        }
        //
        if (Request.QueryString["PatientId"] != null)
        {
            patientId = int.Parse(Request.QueryString["PatientId"]);
            patient   = CntAriCli.GetPatient(patientId, ctx);
            // fix rdc with patient
            rdcPatient.Items.Clear();
            rdcPatient.Items.Add(new RadComboBoxItem(patient.FullName, patient.PersonId.ToString()));
            rdcPatient.SelectedValue = patient.PersonId.ToString();
            rdcPatient.Enabled       = false;
        }
        //
        if (Request.QueryString["VisitId"] != null)
        {
            visitId   = int.Parse(Request.QueryString["VisitId"]);
            visit     = CntAriCli.GetVisit(visitId, ctx);
            patientId = visit.Patient.PersonId;
            patient   = CntAriCli.GetPatient(patientId, ctx);
            // fix rdc with patient
            rdcPatient.Items.Clear();
            rdcPatient.Items.Add(new RadComboBoxItem(patient.FullName, patient.PersonId.ToString()));
            rdcPatient.SelectedValue = patient.PersonId.ToString();
            rdcPatient.Enabled       = false;
            //
            rdpExaminationDate.SelectedDate = visit.VisitDate;
        }
    }
Пример #3
0
 protected bool CreateChange()
 {
     if (!DataOk())
     {
         return(false);
     }
     if (paquimetry == null)
     {
         paquimetry = new Paquimetry();
         UnloadData(paquimetry);
         ctx.Add(paquimetry);
     }
     else
     {
         paquimetry = (Paquimetry)CntAriCli.GetExaminationAssigned(examinationAssignedId, ctx);
         UnloadData(paquimetry);
     }
     ctx.SaveChanges();
     return(true);
 }
Пример #4
0
 protected bool CreateChange()
 {
     if (!DataOk())
     {
         return(false);
     }
     if (topography == null)
     {
         topography = new Topography();
         UnloadData(topography);
         ctx.Add(topography);
     }
     else
     {
         topography = (Topography)CntAriCli.GetExaminationAssigned(examinationAssignedId, ctx);
         UnloadData(topography);
     }
     ctx.SaveChanges();
     return(true);
 }