private void btnDelete_Click(object sender, EventArgs e) { DialogResult dr = MetroFramework.MetroMessageBox.Show(this, "Do you want to delete this information?", "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Stop); if (dr == DialogResult.Yes) { NicuAddmission aNicuAddmission = new NicuAddmission(); aNicuAddmission.Id = Convert.ToInt32(lblId.Text); MessageModel aMessageModel = new NicuAdmissionManager().DeleteNicuPatient(aNicuAddmission); MessageBox.Show(aMessageModel.MessageTitle, aMessageModel.MessageBody, MessageBoxButtons.OK, MessageBoxIcon.Information); Clear(); } }
private void btnSave_Click(object sender, EventArgs e) { NicuAddmission aNicuAddmission = new NicuAddmission(); aNicuAddmission.Id = Convert.ToInt32(lblId.Text); aNicuAddmission.RegNo = txtRegNo.Text; string dateString = dateDischargeDate.Value.Date.ToString("yyyy MMMM dd"); aNicuAddmission.DateofDischarge = Convert.ToDateTime(dateString); aNicuAddmission.AdmitDate = dateAdmitDate.Value; DateTimeOffset thisDate2 = new DateTimeOffset(dateAdmitTime.Value); aNicuAddmission.AdmitTime = thisDate2; aNicuAddmission.DateOfBirth = dateDateOfBirth.Value; aNicuAddmission.Age = txtAge.Text; aNicuAddmission.BabysBloodGroup = txtBabyBloodGroup.Text; aNicuAddmission.Sex = txtSex.Text; aNicuAddmission.MotherName = txtMothersName.Text; aNicuAddmission.FatherName = txtFathersName.Text; aNicuAddmission.MotherAge = txtMothersAge.Text; aNicuAddmission.FatherAge = txtFathersAge.Text; aNicuAddmission.ContactNo = txtContactNo.Text; aNicuAddmission.FatherOccupation = txtFathersOccupation.Text; aNicuAddmission.MotherOccupation = txtMothersOccupation.Text; aNicuAddmission.Address = txtAddress.Text; aNicuAddmission.RefferedInfo = txtRefferedInfo.SelectedValue.ToString(); aNicuAddmission.Remarks = txtRemarks.Text; aNicuAddmission.ComplaintsOne = txtComplaintsOne.Text; aNicuAddmission.ComplaintsTwo = txtComplaintsTwo.Text; aNicuAddmission.ComplaintsThree = txtComplaintsThree.Text; aNicuAddmission.ComplaintsFour = txtComplaintsFour.Text; aNicuAddmission.ComplaintsFive = txtComplaintsFive.Text; aNicuAddmission.MaternalHistory = txtMaternalHistory.Text; aNicuAddmission.LSCS = checkLSCS.Checked ? "1" : "0"; aNicuAddmission.BadObstetricHistory = checkBadObstetricHistory.Checked ? "1" : "0"; aNicuAddmission.Intrapartum = cmbIntrapartum.Text; aNicuAddmission.DeliveryPlace = cmbDeliveryPlace.Text; aNicuAddmission.Conduction = cmbConduction.Text; aNicuAddmission.AntenatalMode = cmbAntenatalMode.Text; aNicuAddmission.ColorOfLiqouo = cmbColorOfLiqouo.Text; aNicuAddmission.Drugs = cmbDrugs.Text; aNicuAddmission.MothersBloodGroup = cmbMothersBloodGroup.Text; aNicuAddmission.MeconiumPassed = checkMeconiumPassed.Checked ? "1" : "0"; DateTime meconiumPassedTime = dateMeconiumPassedTime.Value; TimeSpan meconiumPassedTimeSet = new TimeSpan(meconiumPassedTime.Hour, meconiumPassedTime.Minute, meconiumPassedTime.Second); aNicuAddmission.MeconiumPassedTime = meconiumPassedTimeSet; aNicuAddmission.UrinePassed = checkUrinePassed.Checked ? "1" : "0"; DateTime urinePassedTime = dateUrinePassedTime.Value; TimeSpan urinePassedTimeSet = new TimeSpan(urinePassedTime.Hour, urinePassedTime.Minute, urinePassedTime.Second); aNicuAddmission.UrinePassedTime = urinePassedTimeSet; aNicuAddmission.Breathing = cmbBreathing.Text; aNicuAddmission.Resuscitaion = checkResuscitaion.Checked ? "1" : "0"; aNicuAddmission.ResuscitaionMinute = txtResuscitaionMinute.Text; aNicuAddmission.DelayedCrying = checkDelayedCrying.Checked ? "1" : "0"; aNicuAddmission.NeonatalMods = cmbNeonatalMods.Text; aNicuAddmission.Medications = cmbMedications.Text; aNicuAddmission.MedicationInjParcent = txtMedicationInjParcent.Text; aNicuAddmission.BirthWeight = txtBirthWeight.Text; aNicuAddmission.Length = txtLength.Text; aNicuAddmission.Ofc = txtOfc.Text; aNicuAddmission.ApgerScoresAtOne = txtApgerScoresAtOne.Text; aNicuAddmission.ApgerScoresAtFive = txtApgerScoresAtFive.Text; aNicuAddmission.ApgerScoresAtTen = txtApgerScoresAtTen.Text; aNicuAddmission.Feeding = checkFeeding.Checked ? "1" : "0"; aNicuAddmission.FeedingType = cmbFeedingType.Text; aNicuAddmission.Activity = txtActivity.Text; aNicuAddmission.Posture = txtPosture.Text; aNicuAddmission.Cry = txtCry.Text; aNicuAddmission.Temp = txtTemp.Text; aNicuAddmission.Skin = cmbSkin.Text; aNicuAddmission.RashSec = txtRashSec.Text; aNicuAddmission.HeadNeck = cmbHeadNeck.Text; aNicuAddmission.SternoMastoidTumor = txtSternoMastoidTumor.Text; aNicuAddmission.AnteriorSize = txtAnteriorSize.Text; aNicuAddmission.Tension = txtTension.Text; aNicuAddmission.PosteriorSize = txtPosteriorSize.Text; aNicuAddmission.Face = cmbFace.Text; aNicuAddmission.HeartSound = txtHeartSound.Text; aNicuAddmission.RadioFemoralDelay = txtRadioFemoralDelay.Text; aNicuAddmission.Murmur = txtMurmur.Text; aNicuAddmission.Chest = cmbChest.Text; aNicuAddmission.RrMin = txtRRMin.Text; aNicuAddmission.BreathSound = txtBreathSound.Text; aNicuAddmission.AddedSound = txtAddedSound.Text; aNicuAddmission.HeartRate = txtHeartRate.Text; aNicuAddmission.Shape = checkShape.Checked ? "1" : "0"; aNicuAddmission.Distended = checkDistended.Checked ? "1" : "0"; aNicuAddmission.Liver = txtLiver.Text; aNicuAddmission.Sleen = txtSleen.Text; aNicuAddmission.Kidney = txtKidney.Text; aNicuAddmission.Umbilicus = txtUmbilicus.Text; aNicuAddmission.Scrotum = txtScrotum.Text; aNicuAddmission.Penis = txtPenis.Text; aNicuAddmission.Testis = cmbTestis.Text; aNicuAddmission.LabiaMajora = txtLabiaMajora.Text; aNicuAddmission.Minora = txtMinora.Text; aNicuAddmission.Clitromegaly = txtClitromegaly.Text; aNicuAddmission.Anus = cmbAnus.Text; aNicuAddmission.BackSpine = cmbBackSpine.Text; aNicuAddmission.FootHand = cmbFootHand.Text; aNicuAddmission.CNS = cmbCNS.Text; aNicuAddmission.JitterinessTone = cmbJitterinessTone.Text; aNicuAddmission.Moro = txtMoro.Text; aNicuAddmission.Rooting = txtRooting.Text; aNicuAddmission.Sucking = txtSucking.Text; aNicuAddmission.Fractures = txtFractures.Text; aNicuAddmission.NerveInjury = txtNerveInjury.Text; aNicuAddmission.SoftIssue = txtSoftIssue.Text; aNicuAddmission.Category = cmbCategory.Text; aNicuAddmission.GestationalAge = txtGestationalAge.Text; aNicuAddmission.CongenitalAnomalies = txtCongenitalAnomalies.Text; aNicuAddmission.ProvisionalDiagnosis = txtProvisionalDiagnosis.Text; aNicuAddmission.SalientFeature = txtSalientFeature.Text; aNicuAddmission.FinalDiagnosis = txtFinalDiagnosis.Text; if (cmbBed.Tag != null) { aNicuAddmission.Bed = cmbBed.Tag.ToString(); } //New Added start Service aService = new Service(); aService.OPID = txtRegNo.Text; aService.ServiceId = "N-Serv-02"; aService.Rate = Convert.ToDouble(txtAdmissionFee.Text); aService.Total = Convert.ToDouble(txtAdmissionFee.Text); aService.Qty = 1; aService.IssueDate = dateAdmitDate.Value; //New Added End string actionType = btnSave.Text; NicuAdmissionManager aNicuAdmissionManager = new NicuAdmissionManager(); MessageModel aMessageModel = new MessageModel(); aMessageModel = aNicuAdmissionManager.SaveNicuAdmission(aNicuAddmission, actionType, aService); if (aMessageModel.MessageTitle == "Successfull") { MessageBox.Show(aMessageModel.MessageBody, aMessageModel.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); Clear(); } }