protected void BillButton_Click(object sender, EventArgs e) { BillSystem aBillSystem = new BillSystem(); aBillSystem.BillId = BillId(); aBillSystem.BillAmount = (float)Convert.ToDouble(billAmountTextBox.Text); aBillSystem.ModeOfPayment = billingModeDropDownList.Text; if (billingModeDropDownList.Text == "Card") { aBillSystem.CardNumber = cardNumberTextBox.Text; } else { aBillSystem.CardNumber = " "; } int result = aBillBusinessLogic.GetBillInfo(aBillSystem); }
protected void patientDiagnosisButton_Click(object sender, EventArgs e) { EntityLayer.PatientDiagnosis aPatientDiagnosis = new EntityLayer.PatientDiagnosis(); aPatientDiagnosis.DiagnosisId = GetDiagnosisId(); aPatientDiagnosis.Symptoms = symptompsTextBox.Text; aPatientDiagnosis.DiagnosisProvided = diagnosisProvidedTextBox.Text; aPatientDiagnosis.AdministeredBy = administratedByDropDownList.SelectedItem.Value; aPatientDiagnosis.DateOfDiagnosis = dateOfDiagnosisTextbox.Text; aPatientDiagnosis.FollowUpRequired = followUpTrueRadioButton.Text == "Yes" ? followUpTrueRadioButton.Text : followUpFalseRadioButton.Text; aPatientDiagnosis.DateOfFollowUp = dateOfFollowedUpTextbox.Text; BillSystem aBillSystem = new BillSystem(); aBillSystem.BillId = BillId(); aBillSystem.BillAmount = (float)Convert.ToDouble(billAmountTextBox.Text); aBillSystem.ModeOfPayment = billingModeDropDownList.Text; if (billingModeDropDownList.Text == "Card") { aBillSystem.CardNumber = cardNumberTextBox.Text; } else { aBillSystem.CardNumber = " "; } int resultBillSystem = aBillBusinessLogic.GetBillInfo(aBillSystem); aPatientDiagnosis.BillId = aBillBusinessLogic.GetBillId(); int resultPatientDiagnosys = aBusinessLogic.AddPatientDiagnosis(aPatientDiagnosis); if (resultPatientDiagnosys > 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Inserted Successfully')", true); } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Inserted failed')", true); } Clear(); }