Exemple #1
0
        protected void buttonPermissionApprove_ServerClick(object sender, EventArgs e)
        {
            try
            {
                string nric = ViewState["GridViewPatientSelectedNRIC"].ToString();

                short permission = 0;

                if (CheckBoxTypeHeightMeasurement.Checked)
                {
                    permission += new HeightMeasurement().permissionFlag;
                }
                if (CheckBoxTypeWeightMeasurement.Checked)
                {
                    permission += new WeightMeasurement().permissionFlag;
                }
                if (CheckBoxTypeTemperatureReading.Checked)
                {
                    permission += new TemperatureReading().permissionFlag;
                }
                if (CheckBoxTypeBloodPressureReading.Checked)
                {
                    permission += new BloodPressureReading().permissionFlag;
                }
                if (CheckBoxTypeECGReading.Checked)
                {
                    permission += new ECGReading().permissionFlag;
                }
                if (CheckBoxTypeMRI.Checked)
                {
                    permission += new MRI().permissionFlag;
                }
                if (CheckBoxTypeXRay.Checked)
                {
                    permission += new XRay().permissionFlag;
                }
                if (CheckBoxTypeGait.Checked)
                {
                    permission += new Gait().permissionFlag;
                }

                patientBLL.ApproveRequest(nric, permission);
                Bind_GridViewTherapist();
                Update_UpdatePanelPermissions(nric);
                ScriptManager.RegisterStartupScript(this, GetType(), "alert", "toastr['success']('Request Approved, Permissions of " + nric + " has been Updated.');", true);
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "alert", "toastr['error']('Error occured when Updating Permissions.');", true);
            }
        }
Exemple #2
0
        public void InsertMRI(int id, MRI mri)
        {
            var entity = context.InjuriesDiseases.FirstOrDefault(t => t.Id == id);

            if (entity == null)
            {
                throw new NullReferenceException();
            }

            mri.Id = 0;
            entity.MRIs.Add(mri);

            context.SaveChanges();
        }
        public static MRIView EntityToView(this MRI entity)
        {
            if (entity != null)
            {
                return(new MRIView
                {
                    Id = entity.Id,
                    Info = entity.Info,
                    InjuriesDiseasesId = entity.InjuriesDiseasesId,
                });
            }

            return(null);
        }
Exemple #4
0
        protected void buttonRequest_ServerClick(object sender, EventArgs e)
        {
            try
            {
                string nric       = ViewState["GridViewPatientSelectedNRIC"].ToString();
                short  permission = 0;

                if (CheckBoxTypeHeightMeasurement.Checked)
                {
                    permission += new HeightMeasurement().permissionFlag;
                }
                if (CheckBoxTypeWeightMeasurement.Checked)
                {
                    permission += new WeightMeasurement().permissionFlag;
                }
                if (CheckBoxTypeTemperatureReading.Checked)
                {
                    permission += new TemperatureReading().permissionFlag;
                }
                if (CheckBoxTypeBloodPressureReading.Checked)
                {
                    permission += new BloodPressureReading().permissionFlag;
                }
                if (CheckBoxTypeECGReading.Checked)
                {
                    permission += new ECGReading().permissionFlag;
                }
                if (CheckBoxTypeMRI.Checked)
                {
                    permission += new MRI().permissionFlag;
                }
                if (CheckBoxTypeXRay.Checked)
                {
                    permission += new XRay().permissionFlag;
                }
                if (CheckBoxTypeGait.Checked)
                {
                    permission += new Gait().permissionFlag;
                }

                therapistBLL.SubmitRequest(nric, permission);
                ScriptManager.RegisterStartupScript(this, GetType(), "alert", "$('#modalSelectPermissions').modal('hide');toastr['success']('Request Submitted to " + nric + " for Permissions.');", true);
                Bind_GridViewPatient();
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "alert", "$('#modalSelectPermissions').modal('hide');toastr['error']('Error occured when Submitting Request.');", true);
            }
        }