public void GetDischargeInfo() { aMedicalManager = new NICUDischargeReqManager(); DataTable data = new DataTable(); data = aMedicalManager.GetDischargeInfoMaster(); gridControlDischarge.DataSource = data; }
private void PatientLoad() { var GetAllPatient = new NICUDischargeReqManager().GetAllDischargeNICU(); cmbPatient.Properties.DataSource = GetAllPatient; cmbPatient.Properties.ValueMember = "RegNo"; cmbPatient.Properties.DisplayMember = "PatientName"; }
public void GetDischargeInfoMaster() { string FromDate = Convert.ToString(dataFromDate.Value); string ToDate = Convert.ToString(DateToDate.Value); DataTable data = new DataTable(); data = new NICUDischargeReqManager().GetDischargeInfoMaster(FromDate, ToDate); gridControlDischarge.DataSource = data; }
private void PatientByOPID(string pid) { NicuAddmission patient = new NICUDischargeReqManager().GetPatientInformationBySl(pid); txtFahterHusbandName.Text = patient.FatherName; txtAddress.Text = patient.Address; txtAge.Text = patient.Age; txtGender.Text = patient.Sex; txtBloodGroup.Text = patient.BabysBloodGroup; txtContactNo.Text = patient.ContactNo; // txtConsult.Text = patient.Doctor; txtCabinBedNo.Text = patient.Bed; txtAdmissionOnDate.Text = patient.AdmitDate.ToString("d"); txtRegNo.Text = patient.RegNo; txtWeight.Text = patient.BirthWeight; }
private void searchLookUpGetDischargeInfo_EditValueChanged(object sender, EventArgs e) { //PatientByOPID(cmbPatient.Properties.View.GetFocusedRowCellValue("OPID").ToString()); //txtDiagonsisAdmisson.Focus(); DischargeRequestNICU _dischargePatient = new DischargeRequestNICU(); _dischargePatient.OPID = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("OPID").ToString(); txtFahterHusbandName.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("FatherHusbandName").ToString(); txtRegNo.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("RegNo").ToString(); txtFahterHusbandName.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("FatherHusbandName").ToString(); txtGender.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("Gender").ToString(); txtAge.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("Age").ToString(); txtBloodGroup.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("BloodGroup").ToString(); txtConsult.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("Consult").ToString(); txtWeight.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("weight").ToString(); txtCabinBedNo.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("Cabin_BedNo").ToString(); txtContactNo.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("ContactNo").ToString(); txtDiagonsisAdmisson.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("DiagOnAdmission").ToString(); txtDiagOnDischarge.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("DiagOnDischarge").ToString(); txtAdmissionOnDate.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("AddmissionOn").ToString(); txtDischargeOnDate.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("DischargeOn").ToString(); aMedicalManager = new NICUDischargeReqManager(); DataTable dataTable = new DataTable(); gridControl1.DataSource = null; dataTable = aMedicalManager.GetDischargeDetails(_dischargePatient); for (int i = 0; i < dataTable.Rows.Count; i++) { DataRow rows = tempDrug.NewRow(); tempDrug.Rows.Add(rows); rows["DrugId"] = dataTable.Rows[i]["DrugId"]; rows["DrugName"] = dataTable.Rows[i]["DrugName"]; rows["Doose"] = dataTable.Rows[i]["Doose"]; rows["Description"] = dataTable.Rows[i]["Description"]; rows["Id"] = dataTable.Rows[i]["Id"]; } gridControl1.DataSource = tempDrug; btnSave.Enabled = false; btnEdit.Enabled = true; }
private void gridViewDischarge_DoubleClick(object sender, EventArgs e) { flag = true; xtraTabPage1.Show(); _dischargePatient.OPID = gridViewDischarge.GetFocusedRowCellValue("OPID").ToString(); cmbPatient.Properties.NullValuePrompt = gridViewDischarge.GetFocusedRowCellValue("PatientName").ToString(); DataTable data = new DataTable(); data = new NICUDischargeReqManager().GetDischargeInfo(_dischargePatient); //data = aMedicalManager.GetDischargeInfoMaster(); //gridControlDischarge.DataSource = data; if (data.Rows.Count > 0) { txtFahterHusbandName.Text = data.Rows[0]["FatherName"].ToString(); txtRegNo.Text = data.Rows[0]["RegNo"].ToString(); txtGender.Text = data.Rows[0]["Gender"].ToString(); txtGender.Text = data.Rows[0]["Gender"].ToString(); txtAge.Text = data.Rows[0]["Age"].ToString(); txtBloodGroup.Text = data.Rows[0]["BloodGroup"].ToString(); //txtConsult.Text = data.Rows[0]["Consult"].ToString(); txtWeight.Text = data.Rows[0]["weight"].ToString(); txtContactNo.Text = data.Rows[0]["Phone"].ToString(); txtDiagonsisAdmisson.Text = data.Rows[0]["DiagOnAdmission"].ToString(); txtDiagOnDischarge.Text = data.Rows[0]["DiagOnDischarge"].ToString(); txtAdmissionOnDate.Text = data.Rows[0]["InputDate"].ToString(); txtDischargeOnDate.Text = data.Rows[0]["DischargeOn"].ToString(); txtAddress.Text = data.Rows[0]["Address"].ToString(); txtCabinBedNo.Text = data.Rows[0]["BedName"].ToString(); bool Crued = Convert.ToBoolean(data.Rows[0]["Cured"]); if (Crued) { cured.Checked = true; } else { cured.Checked = false; } bool dor = Convert.ToBoolean(data.Rows[0]["Dor"]); if (dor) { Dor.Checked = true; } else { Dor.Checked = false; } bool Improved = Convert.ToBoolean(data.Rows[0]["Improved"]); if (Improved) { improved.Checked = true; } else { improved.Checked = false; } bool dorb = Convert.ToBoolean(data.Rows[0]["Dorb"]); if (dorb) { Dorb.Checked = true; } else { Dorb.Checked = false; } bool notImproved = Convert.ToBoolean(data.Rows[0]["NotImproved"]); if (notImproved) { NotImproved.Checked = true; } else { NotImproved.Checked = false; } } //Grid view start here aMedicalManager = new NICUDischargeReqManager(); DataTable dataTable = new DataTable(); gridControl1.DataSource = null; dataTable = aMedicalManager.GetDischargeDetails(_dischargePatient); for (int i = 0; i < dataTable.Rows.Count; i++) { DataRow rows = tempDrug.NewRow(); tempDrug.Rows.Add(rows); rows["DrugId"] = dataTable.Rows[i]["DrugId"]; rows["DrugName"] = dataTable.Rows[i]["DrugName"]; rows["Doose"] = dataTable.Rows[i]["Doose"]; rows["Description"] = dataTable.Rows[i]["Description"]; rows["Route"] = dataTable.Rows[i]["Route"]; rows["RelatedToMeal"] = dataTable.Rows[i]["RelatedToMeal"]; rows["Id"] = dataTable.Rows[i]["Id"]; } gridControl1.DataSource = tempDrug; btnSave.Enabled = false; btnEdit.Enabled = true; }
public void SaveAndUpdateDischargePatient() { // DischargePatient _dischargePatients = new DischargePatient(); try { _dischargePatient.FatherHusbandName = txtFahterHusbandName.Text; _dischargePatient.Gender = txtGender.Text; _dischargePatient.Age = txtAge.Text; _dischargePatient.BloodGroup = txtBloodGroup.Text; _dischargePatient.Consult = txtConsult.SelectedValue.ToString(); _dischargePatient.Cabin_BedNo = txtCabinBedNo.Text; _dischargePatient.ContactNo = txtContactNo.Text; _dischargePatient.AddmissionOn = Convert.ToDateTime(txtAdmissionOnDate.Text); _dischargePatient.DiagOnAdmission = txtDiagonsisAdmisson.Text; _dischargePatient.OPID = cmbPatient.Properties.View.GetFocusedRowCellValue("RegNo").ToString(); _dischargePatient.DischargeOn = Convert.ToDateTime(txtDischargeOnDate.Text); _dischargePatient.BreffHistory = Convert.ToString(txtBreafHistory.Text); DateTime dt = txtDischareTime.Value; TimeSpan st = new TimeSpan(dt.Hour, dt.Minute, dt.Second); _dischargePatient.DischargeTime = st; _dischargePatient.RegNo = txtRegNo.Text; _dischargePatient.StatusOnDischarge = txtBreafHistory.Text; _dischargePatient.weight = txtWeight.Text; _dischargePatient.DiagOnDischarge = txtDiagOnDischarge.Text; _dischargePatient.Cured = cured.Checked; _dischargePatient.Improved = improved.Checked; _dischargePatient.Dorb = Dorb.Checked; _dischargePatient.Dor = Dor.Checked; _dischargePatient.NotImproved = NotImproved.Checked; _dischargePatient.BreffHistory = txtBreafHistory.Text; _dischargePatient.Tempdatatable = tempDrug; _dischargePatient.Route = txtRoute.Text; _dischargePatient.ReleatedToMeal = txtRealtedToMeal.Text; List <Advice> Advice = new List <Advice>(); foreach (ListViewItem listViewItem in listViewAdvice.Items) { Advice.Add(new Advice() { AdviceName = listViewItem.SubItems[1].Text }); } _dischargePatient.ListofAdvice = Advice; if (btnSave.Enabled) { MessageModel messageModel = new NICUDischargeReqManager().SaveNICUDischargePatient(_dischargePatient); MessageBox.Show(messageModel.MessageBody, messageModel.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); reset(); } else if (btnEdit.Enabled) { MessageModel messageModel = new NICUDischargeReqManager().UpdateNICUDischargePatient(_dischargePatient); MessageBox.Show(messageModel.MessageBody, messageModel.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); reset(); } } catch (Exception ex) { //throw; } }