public void LoadDataForIPD(string pslNo) { Patient patient = new Patient(); if (toggleSwitch1.IsOn) { patient = new OPD_Manager().GetPatientInformationBySl(pslNo); } else { patient = new IpdManager().GetPatientInformationBySl(pslNo); } txtName.Text = patient.PatientName; txtFatherName.Text = patient.FatherName; txtMotherName.Text = patient.MotherName; txtAddress.Text = patient.Address; txtAge.Text = patient.Age; txtPhone.Text = patient.Phone; txtMobile.Text = patient.Mobile; txtGuirdian.Text = patient.Gurdian; txtRelation.Text = patient.Relation; txtGender.Text = patient.Gender; txtBloodGroup.Text = patient.BloodGroup; txtReligion.Text = patient.Religion; txtCabinBed.Text = patient.SelectedBed; }
public void Save() { DAL.Model.OutDoorBill aDischargeBill = new DAL.Model.OutDoorBill(); aDischargeBill.Date = billDate.Value; aDischargeBill.BillNo = txtbill.Text; aDischargeBill.OPID = gridView1.GetFocusedRowCellValue("OPID").ToString(); aDischargeBill.BillType = cmbBillType.Text; aDischargeBill.TotalBill = Convert.ToDouble(txttotalBill.Text); aDischargeBill.SubTotal = Convert.ToDouble(txtSubTotal.Text); aDischargeBill.discount = Convert.ToDouble(txtdiscount.Text); aDischargeBill.AdvancedPayble = Convert.ToDouble(txtadvancePaid.Text); aDischargeBill.NetPayble = Convert.ToDouble(txtNetPayble.Text); aDischargeBill.HospitalCharge = Convert.ToDouble(txthospitalcharge.Text); aDischargeBill.NurseCharge = Convert.ToDouble(txtOTSerivce.Text); aDischargeBill.DoctorCharge = Convert.ToDouble(txtdoctorcharge.Text); aDischargeBill.RoomBedCharge = Convert.ToDouble(txtBedCharge.Text); aDischargeBill.ServiceCharge = Convert.ToDouble(txtservicecharge.Text); aDischargeBill.MedicalCharge = Convert.ToDouble(txtmedicaineCharge.Text); aDischargeBill.PathologyBill = Convert.ToDouble(txtpathology.Text); aDischargeBill.InwardText = lblInward.Text; aDischargeBill.Remarks = txtremarks.Text; aDischargeBill.OTService = Convert.ToDouble(txtOTSerivce.Text); aDischargeBill.OTMedicin = Convert.ToDouble(txtOTMedicine.Text); aDischargeBill.vat = Convert.ToDouble(txtTax.Text); MessageModel message = new OPD_Manager().SaveDischargeBill(aDischargeBill); if (message != null) { MessageBox.Show(message.MessageBody, message.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void GetOPBIllID() { DataTable dt = new OPD_Manager().OPBillID(); if (dt != null && dt.Rows.Count > 0) { txtbill.Text = dt.Rows[0][0].ToString(); } }
public void GetPatient(string pid) { DataTable patienTable = new OPD_Manager().OutDoorBillPatient(); gridControl1.DataSource = patienTable; DataTable existingBillList = new OpdGateway().GetOutdoorPatient(); gridControl2.DataSource = existingBillList; }
private void SaveIssueMedicine() { IssueMedine OTmedine = new IssueMedine(); Service aService = new Service(); aService.IssueMedines = AddProductMedinine(); aService.OPID = cmbPid.Text; OTmedine.date = dtpOPmedicine.Value; OTmedine.MedineList = IssueDatatble; MessageModel message = new OPD_Manager().SaveOtIssueMedine(aService); MessageBox.Show(message.MessageBody, message.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void CellvaluechnagedForIssueMedicine(string value) { DataRow service = new OPD_Manager().GetIssueMedineStock().AsEnumerable().FirstOrDefault(a => a["ProductId"].ToString() == value); var productId = service["ProductId"].ToString(); var productName = service["ProductName"].ToString(); var Rate = service["Rate"].ToString(); griViewIssueMedine.SetFocusedRowCellValue("ProductId", productId); griViewIssueMedine.SetFocusedRowCellValue("ProductName", productName); griViewIssueMedine.SetFocusedRowCellValue("Rate", Rate); griViewIssueMedine.SetFocusedRowCellValue("ServiceTotal", 1 * Convert.ToDouble(Rate)); griViewIssueMedine.SetFocusedRowCellValue("Qty", 1); }
public void MedineList() { try { Service service = new Service(); DataTable MedineList = new OPD_Manager().GetIssueMedineStock();; service.OPID = cmbPid.Text; service.GodownId = "3"; var list = new ServiceManager().GetOPMedicineListByPatientId(service); dt = new CustomLibry.CustomLibrary().ToDataTable(list); Int64 MaxID = new ServiceGateway().GetOPMedMaxValue(); } catch (Exception) { } }
private void btnSave_Click(object sender, EventArgs e) { try { InitialAllField(); MessageModel messageModel = new OPD_Manager().PatientCreate(_patient); MessageBox.Show(messageModel.MessageBody, messageModel.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); SetNew(); } catch (Exception error) { MessageBox.Show("Failed to save patient! " + error.Message.ToString(), "Failed", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void GetAllPatientSlNo(string status) { if (status == "IPD") { DataTable slNo = new DataTable(); slNo = new IpdManager().GetAllIpdPatientSl(); cmbPid.DataSource = slNo; cmbPid.DisplayMember = "OPID"; cmbPid.ValueMember = "OPID"; } else { var slNo = new OPD_Manager().GetAllOpdPatienSlNo(); cmbPid.DataSource = slNo; cmbPid.DisplayMember = "OPID"; cmbPid.ValueMember = "OPID"; } }
private void btnDelete_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("Are you sure to delete row?", "Confirmation Message", MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) { _patient = new Patient(); _patient.OPID = txtID.Text; _opdManager = new OPD_Manager(); _opdManager.DeletePatient(_patient); SetNew(); } else { //nothing to do } //LoadData(); //DialogResult dr = MessageBox.Show("Are you sure to delete row?", "Confirmation Message", MessageBoxButtons.YesNo); //if (dr == DialogResult.Yes) //{ // _patient.OPID = txtID.Text; // MessageModel messageModel = new OPD_Manager().PatientCreate(_patient); // _opdManager=new OPD_Manager(); // string message = -opdManager.DeletePatient(); // MessageBox.Show(message); // ResetAllData(); // PopulateCategoriesListView(); //} //else //{ // //Nothing to do //} }
private void gridView1_DoubleClick(object sender, EventArgs e) { string getBill = gridView1.GetFocusedRowCellValue("OPID").ToString(); DAL.Model.OutDoorBill patientBill = new DAL.Model.OutDoorBill(); patientBill.OPID = getBill; patientBill = new OPD_Manager().GetDischargeBill(patientBill); txtdoctorcharge.Text = patientBill.TConsultBill; txtservicecharge.Text = patientBill.ServiceCharge.ToString("f"); lblReg.Text = patientBill.OPID; txtpathology.Text = patientBill.PBill.ToString("f"); txtdischargeTime.Text = patientBill.DiscTime; txtdischargedate.Text = Convert.ToDateTime(patientBill.DeisDate).ToString("d"); lblPatientName.Text = patientBill.PatientName; txtBedCharge.Text = patientBill.TotalBedCharge; txtmedicaineCharge.Text = patientBill.PharmacyBill.ToString("f"); txtOTSerivce.Text = patientBill.OTservice.ToString("f"); txtOTMedicine.Text = patientBill.OTMedicine.ToString("f"); txthospitalcharge.Text = patientBill.HospitalCharge.ToString("f"); txtnoofdays.Text = patientBill.NoOfDay; txttotalBill.Text = patientBill.TotalBill.ToString("f"); txtadvancePaid.Text = patientBill.AdvancedPayble.ToString("f"); }
public void MedineList() { try { Service service = new Service(); DataTable MedineList = new OPD_Manager().GetIssueMedineStock();; repositoryOtMedicine.DataSource = MedineList; repositoryOtMedicine.DisplayMember = "ProductId"; repositoryOtMedicine.ValueMember = "ProductId"; service.IssueDate = dtpOPmedicine.Value; service.OPID = cmbPid.Text; service.GodownId = "3"; var list = new ServiceManager().GetOPMedicineListByPatientId(service); dt = new CustomLibry.CustomLibrary().ToDataTable(list); gridControlIssueMedine.DataSource = dt; Int64 MaxID = new ServiceGateway().GetOPMedMaxValue(); griViewIssueMedine.SetRowCellValue(griViewIssueMedine.RowCount - 1, "VoucherNo", MaxID); } catch (Exception) { } }
public void ViewBillList() { DataTable patienTable = new OPD_Manager().OutDoorBillListPatient(FromDate.Value, ToDate.Value); gridControl1.DataSource = patienTable; }