Beispiel #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int result = 0;

            ObjentityPatient.PatientID         = Session["PatientId"].ToString();
            ObjentityPatient.Symptoms          = txtSymptome.Text;
            ObjentityPatient.DiagnosisProvided = txtDiagnosis.Text;
            ObjentityPatient.AdministeredBy    = DropDownListPhysican.Text;

            Control      ctday   = calenderControDateDiagnosis.FindControl("DropDownListDay");
            Control      ctmonth = calenderControDateDiagnosis.FindControl("DropDownListMonth");
            Control      ctyear  = calenderControDateDiagnosis.FindControl("DropDownListYear");
            DropDownList dlday   = (DropDownList)ctday;
            DropDownList dlmonth = (DropDownList)ctmonth;
            DropDownList dlyear  = (DropDownList)ctyear;

            ObjentityPatient.DateOfDiagnosis = dlday.SelectedValue.ToString() + "/" + dlmonth.SelectedValue.ToString() + "/" + dlyear.SelectedValue.ToString();



            if (CheckBoxFollow.Checked == true)
            {
                ObjentityPatient.FollowUpRequireed = "Y";
                Control      ctdayF   = calenderControlDateFollow.FindControl("DropDownListDay");
                Control      ctmonthF = calenderControlDateFollow.FindControl("DropDownListMonth");
                Control      ctyearF  = calenderControlDateFollow.FindControl("DropDownListYear");
                DropDownList dldayF   = (DropDownList)ctdayF;
                DropDownList dlmonthF = (DropDownList)ctmonthF;
                DropDownList dlyearF  = (DropDownList)ctyearF;
                ObjentityPatient.DateOfFollowUp = dldayF.SelectedValue.ToString() + "/" + dlmonthF.SelectedValue.ToString() + "/" + dlyearF.SelectedValue.ToString();
            }
            else if (CheckBoxFollow.Checked == false)
            {
                ObjentityPatient.FollowUpRequireed = "N";
                ObjentityPatient.DateOfFollowUp    = " ";
            }

            ObjentityPatient.BillId = LblBillId.Text;

            result = objBusinessLayer.businessAddPatientDiognasis(ObjentityPatient);
            if (result > 0)
            {
                billInfo.Visible      = true;
                PatienDeatils.Visible = false;
            }
            else
            {
                Response.Write("wrong");
            }
        }