Beispiel #1
0
    protected void UnloadData(Biometry bio)
    {
        bio.Patient         = CntAriCli.GetPatient(int.Parse(rdcPatient.SelectedValue), ctx);
        bio.ExaminationDate = (DateTime)rdpExaminationDate.SelectedDate;
        bio.Examination     = CntAriCli.GetExamination(int.Parse(rdcExamination.SelectedValue), ctx);
        if (visit != null)
        {
            bio.BaseVisit = visit;
        }
        bio.Formula = txtFormula.Text;
        if (txtLIOLeft.Value != null)
        {
            bio.LioLeftEye = (decimal)txtLIOLeft.Value;
        }
        if (txtLIORight.Value != null)
        {
            bio.LioRightEye = (decimal)txtLIORight.Value;
        }

        if (txtALXLeft.Value != null)
        {
            bio.AlxLeftEye = (decimal)txtALXLeft.Value;
        }
        if (txtALXRight.Value != null)
        {
            bio.AlxRightEye = (decimal)txtALXRight.Value;
        }

        bio.Comments = txtComments.Text;
    }
    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 == "examination"
                            select p).FirstOrDefault <Process>();
            per = CntAriCli.GetPermission(user.UserGroup, proc, ctx);
            btnAccept.Visible = per.Modify;
        }

        //
        if (Request.QueryString["ExaminationId"] != null)
        {
            examinationId = Int32.Parse(Request.QueryString["ExaminationId"]);
            examination   = CntAriCli.GetExamination(examinationId, ctx);
            LoadData(examination);
        }
        LoadExaminationTypeCombo(examination);
    }
 protected void UnloadData(Refractometry rf)
 {
     rf.Patient         = CntAriCli.GetPatient(int.Parse(rdcPatient.SelectedValue), ctx);
     rf.ExaminationDate = (DateTime)rdpExaminationDate.SelectedDate;
     rf.Examination     = CntAriCli.GetExamination(int.Parse(rdcExamination.SelectedValue), ctx);
     if (visit != null)
     {
         rf.BaseVisit = visit;
     }
     rf.Comments = txtComments.Text;
 }
 protected void UnloadData(ExaminationAssigned da)
 {
     da.Patient         = CntAriCli.GetPatient(int.Parse(rdcPatient.SelectedValue), ctx);
     da.ExaminationDate = (DateTime)rdpExaminationDate.SelectedDate;
     da.Examination     = CntAriCli.GetExamination(int.Parse(rdcExamination.SelectedValue), ctx);
     if (visit != null)
     {
         da.BaseVisit = visit;
     }
     da.Comments = txtComments.Text;
 }
Beispiel #5
0
 protected void UnloadData(Paquimetry paq)
 {
     paq.Patient         = CntAriCli.GetPatient(int.Parse(rdcPatient.SelectedValue), ctx);
     paq.ExaminationDate = (DateTime)rdpExaminationDate.SelectedDate;
     paq.Examination     = CntAriCli.GetExamination(int.Parse(rdcExamination.SelectedValue), ctx);
     if (visit != null)
     {
         paq.BaseVisit = visit;
     }
     if (txtCC0Left.Value != null)
     {
         paq.LeftEyeCentralC0 = (decimal)txtCC0Left.Value;
     }
     if (txtCC0Right.Value != null)
     {
         paq.RightEyeCentralC0 = (decimal)txtCC0Right.Value;
     }
     if (txtC1Left.Value != null)
     {
         paq.LeftEyeC1 = (decimal)txtC1Left.Value;
     }
     if (txtC1Right.Value != null)
     {
         paq.RightEyeC1 = (decimal)txtC1Right.Value;
     }
     if (txtC3Left.Value != null)
     {
         paq.LeftEyeC3 = (decimal)txtC3Left.Value;
     }
     if (txtC3Right.Value != null)
     {
         paq.RightEyeC3 = (decimal)txtC3Right.Value;
     }
     if (txtC5Left.Value != null)
     {
         paq.LeftEyeC5 = (decimal)txtC5Left.Value;
     }
     if (txtC5Right.Value != null)
     {
         paq.RightEyeC5 = (decimal)txtC5Right.Value;
     }
     if (txtC7Left.Value != null)
     {
         paq.LeftEyeC7 = (decimal)txtC7Left.Value;
     }
     if (txtC7Right.Value != null)
     {
         paq.RightEyeC7 = (decimal)txtC7Right.Value;
     }
     paq.Comments = txtComments.Text;
 }
Beispiel #6
0
 protected void UnloadData(Topography topo)
 {
     topo.Patient         = CntAriCli.GetPatient(int.Parse(rdcPatient.SelectedValue), ctx);
     topo.ExaminationDate = (DateTime)rdpExaminationDate.SelectedDate;
     topo.Examination     = CntAriCli.GetExamination(int.Parse(rdcExamination.SelectedValue), ctx);
     if (visit != null)
     {
         topo.BaseVisit = visit;
     }
     if (txtK1Left.Value != null)
     {
         topo.LeftEyeK1 = (decimal)txtK1Left.Value;
     }
     if (txtK1Right.Value != null)
     {
         topo.RightEyeK1 = (decimal)txtK1Right.Value;
     }
     if (txtK2Left.Value != null)
     {
         topo.LeftEyeK2 = (decimal)txtK2Left.Value;
     }
     if (txtK2Right.Value != null)
     {
         topo.RightEyeK2 = (decimal)txtK2Right.Value;
     }
     if (txtAstigLeft.Value != null)
     {
         topo.LeftEyeAstig = (decimal)txtAstigLeft.Value;
     }
     if (txtAstigRight.Value != null)
     {
         topo.RightEyeAstig = (decimal)txtAstigRight.Value;
     }
     if (txtAxisLeft.Value != null)
     {
         topo.LeftEyeAxis = (decimal)txtAxisLeft.Value;
     }
     if (txtAxisRight.Value != null)
     {
         topo.RightEyeAxis = (decimal)txtAxisRight.Value;
     }
     topo.Comments = txtComments.Text;
 }
 protected bool CreateChange()
 {
     if (!DataOk())
     {
         return(false);
     }
     if (examination == null)
     {
         examination = new Examination();
         UnloadData(examination);
         ctx.Add(examination);
     }
     else
     {
         examination = CntAriCli.GetExamination(examinationId, ctx);
         UnloadData(examination);
     }
     ctx.SaveChanges();
     return(true);
 }