示例#1
0
        private void btnYes_Click(object sender, EventArgs e)
        {
            if (txtPateintID.Text != null && txtPateintID.Text.Count() >= 1 && txtPatientName.Text != null)
            {
                try
                {
                    int PateintID   = Convert.ToInt16(txtPateintID.Text);
                    var patientData = processPatient.getPateintByID(PateintID);

                    DialogResult dResult = MessageBox.Show("Do you want to Edit details for the this report, for better look?", "Please Wait >>>>", MessageBoxButtons.YesNo, MessageBoxIcon.Stop);
                    if (dResult.ToString() == "No")
                    {
                        btnYes.Text = "Wait...";
                        RptPateintInit rptPateintInit = new RptPateintInit(PateintID);
                        rptPateintInit.InitialiazeReport();
                    }
                    else
                    {
                        PatientEditForm.Instance(patientData).Show();
                    }
                }
                catch (Exception ex)
                {
                    return;
                }
            }
            else
            {
            }
        }
示例#2
0
        private void btnUpdateForPrint_Click(object sender, EventArgs e)
        {
            Patient objPateint = new Patient();

            //Getting the data from the Pateint form
            objPateint.ID             = Convert.ToInt16(txtHiddenID.Text);
            objPateint.PatientName    = txtPatName.Text;
            objPateint.PatientAddress = txtPatResid.Text;
            //objPateint.PatientDescription = txtPatTreatment.Text;
            //objPateint.AppointmentDate = datePickerAppointment.Value;
            //objPateint.PatientDiagnosis = txtPatDiagnosis.Text;
            //objPateint.PatientTreatment = txtPatTreatment.Text;


            //Getting the Enum value for the pateint type
            //Get Medicine Type

            objPateint.PatientType = patientProcess.getPateintType(cmboBxPatType.Text);

            //saving pateint data

            try
            {
                //update pateint
                patientProcess.UpdatePatient(objPateint);
                lblStatus.Text        = "Data updated successfullly!";
                btnUpdatePatient.Text = "Print";

                btnUpdatePatient.Text = "Preparing for print...";
                RptPateintInit rptPateintInit = new RptPateintInit(Convert.ToInt16(txtHiddenID.Text));
                rptPateintInit.InitialiazeReport();
            }
            catch (Exception ex)
            {
                lblStatus.Text = "Error:" + ex.Message;
            }
        }