private void btnPrint_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(lblAdvBillNo.Text.ToString())) { CIS.BillTemplates.frmPrintReceipt frmAdvanceRececipt = new BillTemplates.frmPrintReceipt("AdvanceBill", lblAdvBillNo.Text.ToString(), "PatientId"); frmAdvanceRececipt.ShowDialog(); } }
private void btnPrint_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(lblWardBillNo.Text)) { CIS.BillTemplates.frmPrintReceipt frmWardRececipt = new BillTemplates.frmPrintReceipt("WardBill", lblWardBillNo.Text, txtPatientId.Text); frmWardRececipt.ShowDialog(); } }
private void cellMenuItem_Clicked(object sender, ToolStripItemClickedEventArgs e) { int rowIndex = dgvViewAdvanceCollection.CurrentRow.Index; Common.Common.billNo = dgvViewAdvanceCollection.Rows[rowIndex].Cells["Receipt No"].Value.ToString(); switch (e.ClickedItem.Name.ToString()) { case "PrintBill": if (!string.IsNullOrEmpty(Common.Common.billNo)) { CIS.BillTemplates.frmPrintReceipt frmAdvanceRececipt = new BillTemplates.frmPrintReceipt("AdvanceBill", Common.Common.billNo, "PatientId"); frmAdvanceRececipt.ShowDialog(); } break; default: break; } }
private void btnBillPrint_Click(object sender, EventArgs e) { try { if (dgvViewLabBills.SelectedRows.Count > 0) { CIS.BillTemplates.frmPrintReceipt frmPhaRececipt = new BillTemplates.frmPrintReceipt("InvestigationBill", dgvViewLabBills.SelectedRows[0].Cells["Bill Number"].Value.ToString(), dgvViewLabBills.SelectedRows[0].Cells["Patient Id"].Value.ToString()); frmPhaRececipt.ShowDialog(); } else { MessageBox.Show("Please select any Bill!", "View Result Entry", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { Common.Common.ExceptionHandler.ExceptionWriter(ex); MessageBox.Show(ex.Message, "View Result Entry", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cellMenuItem_Clicked(object sender, ToolStripItemClickedEventArgs e) { int rowIndex = dgvViewWardBillDetails.CurrentRow.Index; Common.Common.billNo = dgvViewWardBillDetails.Rows[rowIndex].Cells["Bill No"].Value.ToString(); string statusN = string.Empty; statusN = dgvViewWardBillDetails.Rows[rowIndex].Cells["Status"].Value.ToString(); switch (e.ClickedItem.Name.ToString()) { case "PrintBill": if ((!string.IsNullOrEmpty(Common.Common.billNo)) && statusN != "Cancelled") { CIS.BillTemplates.frmPrintReceipt frmWardRececipt = new BillTemplates.frmPrintReceipt("WardBill", Common.Common.billNo, "PatientId"); frmWardRececipt.ShowDialog(); } break; default: break; } }
private void cellMenuItem_Clicked(object sender, ToolStripItemClickedEventArgs e) { int rowIndex = dgvViewRegAndInvoice.CurrentRow.Index; string statusN = string.Empty; Common.Common.billNo = dgvViewRegAndInvoice.Rows[rowIndex].Cells["Bill No"].Value.ToString(); Common.Common.cis_number_generation.visit_number = dgvViewRegAndInvoice.Rows[rowIndex].Cells["Visit Id"].Value.ToString(); string subStrBillType; subStrBillType = Common.Common.billNo.Substring(0, 2); dtSource = objBusinessFacade.getBillTypeId(subStrBillType); Common.Common.billTypeId = objBusinessFacade.NonBlankValueOfInt(dtSource.Rows[0]["number_format_id"].ToString()); if (Common.Common.billTypeId == 4) { statusN = dgvViewRegAndInvoice.Rows[rowIndex].Cells["Visit Mode"].Value.ToString(); } else { statusN = dgvViewRegAndInvoice.Rows[rowIndex].Cells["Status"].Value.ToString(); } if (Common.Common.billTypeId > 0 && statusN != "Cancelled") { switch (e.ClickedItem.Name.ToString()) { case "Print Receipt": switch (Common.Common.billTypeId) { //Registration Bill case 4: CIS.BillTemplates.frmPrintReceipt frmRegRececipt = new BillTemplates.frmPrintReceipt("RegistrationBill", Common.Common.billNo, Common.Common.cis_number_generation.patient_id); frmRegRececipt.ShowDialog(); break; //Investigation Bill case 5: CIS.BillTemplates.frmPrintReceipt frmInvRececipt = new BillTemplates.frmPrintReceipt("InvestigationBill", Common.Common.billNo, Common.Common.cis_number_generation.patient_id); frmInvRececipt.ShowDialog(); break; //Pharmacy Bill case 6: CIS.BillTemplates.frmPrintReceipt frmPhaRececipt = new BillTemplates.frmPrintReceipt("PharmacyBill", Common.Common.billNo, Common.Common.cis_number_generation.patient_id); frmPhaRececipt.ShowDialog(); break; //General Bill case 7: CIS.BillTemplates.frmPrintReceipt frmGenRececipt = new BillTemplates.frmPrintReceipt("GeneralBill", Common.Common.billNo, Common.Common.cis_number_generation.patient_id); frmGenRececipt.ShowDialog(); break; default: break; } break; case "Print Label": //Registration Slip if (!string.IsNullOrEmpty(Common.Common.cis_number_generation.visit_number)) { CIS.BillTemplates.frmPrintReceipt frmRegSlip = new BillTemplates.frmPrintReceipt("RegistrationSlip", Common.Common.billNo, Common.Common.cis_number_generation.visit_number); frmRegSlip.ShowDialog(); } break; default: break; } } else { MessageBox.Show("Bill is Cancelled....!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvSettleAllDue.Rows.Count > 0) { string regBillId = string.Empty; string invBillId = string.Empty; string phaBillId = string.Empty; string genBillId = string.Empty; string wardBillId = string.Empty; StringBuilder regBillIds = new StringBuilder(); StringBuilder invBillIds = new StringBuilder(); StringBuilder phaBillIds = new StringBuilder(); StringBuilder genBillIds = new StringBuilder(); StringBuilder wardBillIds = new StringBuilder(); foreach (DataGridViewRow row in dgvSettleAllDue.Rows) { //if (objBusinessFacade.NonBlankValueOfInt(Convert.ToString(row.Cells["bill_id"].Value)) > 0 && (objBusinessFacade.NonBlankValueOfDecimal(Convert.ToString(row.Cells["Discount"].Value)) > 0 || objBusinessFacade.NonBlankValueOfDecimal(Convert.ToString(row.Cells["Amount Paid"].Value)) > 0 || objBusinessFacade.NonBlankValueOfDecimal(Convert.ToString(row.Cells["Adv Adj"].Value)) > 0)) { //Common.Common.billId = objBusinessFacade.NonBlankValueOfInt(Convert.ToString(row.Cells["bill_id"].Value)); Common.Common.cis_department.departmentName = Convert.ToString(row.Cells["Department"].Value); //objArg.ParamList["bill_id"] = Common.Common.billId; switch (Common.Common.cis_department.departmentName) { case "Registration": regBillId = Convert.ToString(row.Cells["bill_id"].Value); regBillIds.Append(regBillId).Append(","); break; case "Investigation": invBillId = Convert.ToString(row.Cells["bill_id"].Value); invBillIds.Append(invBillId).Append(","); break; case "Pharmacy": phaBillId = Convert.ToString(row.Cells["bill_id"].Value); phaBillIds.Append(phaBillId).Append(","); break; case "General": genBillId = Convert.ToString(row.Cells["bill_id"].Value); genBillIds.Append(genBillId).Append(","); break; case "IP Billing": wardBillId = Convert.ToString(row.Cells["bill_id"].Value); wardBillIds.Append(wardBillId).Append(","); break; default: break; } } /*else * { * MessageBox.Show("No settlements are done...!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); * }*/ } if (!(string.IsNullOrEmpty(regBillIds.ToString()))) { regBillIds = regBillIds.Remove(regBillIds.Length - 1, 1); } else { regBillIds.Append("0"); } if (!(string.IsNullOrEmpty(invBillIds.ToString()))) { invBillIds = invBillIds.Remove(invBillIds.Length - 1, 1); } else { invBillIds.Append("0"); } if (!(string.IsNullOrEmpty(phaBillIds.ToString()))) { phaBillIds = phaBillIds.Remove(phaBillIds.Length - 1, 1); } else { phaBillIds.Append("0"); } if (!(string.IsNullOrEmpty(genBillIds.ToString()))) { genBillIds = genBillIds.Remove(genBillIds.Length - 1, 1); } else { genBillIds.Append("0"); } if (!(string.IsNullOrEmpty(wardBillIds.ToString()))) { wardBillIds = wardBillIds.Remove(wardBillIds.Length - 1, 1); } else { wardBillIds.Append("0"); } objArg.ParamList["regBillIds"] = regBillIds.ToString(); objArg.ParamList["invBillIds"] = invBillIds.ToString(); objArg.ParamList["phaBillIds"] = phaBillIds.ToString(); objArg.ParamList["genBillIds"] = genBillIds.ToString(); objArg.ParamList["wardBillIds"] = wardBillIds.ToString(); CIS.BillTemplates.frmPrintReceipt frmDueCollRececipt = new BillTemplates.frmPrintReceipt("DueCollectionBill", objArg); frmDueCollRececipt.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Settle All Due", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cellMenuItem_Clicked(object sender, ToolStripItemClickedEventArgs e) { try { int rowIndex = dgvViewBillDetails.CurrentRow.Index; Common.Common.billNo = dgvViewBillDetails.Rows[rowIndex].Cells["Bill No"].Value.ToString(); Common.Common.cis_number_generation.patient_id = txtPatientId.Text;//dgvViewBillDetails.Rows[rowIndex].Cells["Patient_Id"].Value.ToString(); string statusN = dgvViewBillDetails.Rows[rowIndex].Cells["Status"].Value.ToString(); string subStrBillType; subStrBillType = Common.Common.billNo.Substring(0, 2); dtSource = objBusinessFacade.getBillTypeId(subStrBillType); Common.Common.billTypeId = objBusinessFacade.NonBlankValueOfInt(dtSource.Rows[0]["number_format_id"].ToString()); if (Common.Common.billTypeId > 0 && statusN != "Cancelled") { switch (e.ClickedItem.Name.ToString()) { case "Print": switch (Common.Common.billTypeId) { //Registration Bill case 4: CIS.BillTemplates.frmPrintReceipt frmRegRececipt = new BillTemplates.frmPrintReceipt("RegistrationBill", Common.Common.billNo, Common.Common.cis_number_generation.patient_id); frmRegRececipt.ShowDialog(); break; //Investigation Bill case 5: CIS.BillTemplates.frmPrintReceipt frmInvRececipt = new BillTemplates.frmPrintReceipt("InvestigationBill", Common.Common.billNo, Common.Common.cis_number_generation.patient_id); frmInvRececipt.ShowDialog(); break; //Pharmacy Bill case 6: CIS.BillTemplates.frmPrintReceipt frmPhaRececipt = new BillTemplates.frmPrintReceipt("PharmacyBill", Common.Common.billNo, Common.Common.cis_number_generation.patient_id); frmPhaRececipt.ShowDialog(); break; //General Bill case 7: CIS.BillTemplates.frmPrintReceipt frmGenRececipt = new BillTemplates.frmPrintReceipt("GeneralBill", Common.Common.billNo, Common.Common.cis_number_generation.patient_id); frmGenRececipt.ShowDialog(); break; default: break; } break; case "View": break; default: break; } } else { MessageBox.Show("No bill for Cancelled Bill....!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show(ex.Message, "View Bill Details", MessageBoxButtons.OK, MessageBoxIcon.Error); } }