private void PrintPreviewInjection(bool preview) { string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); rptNewCurrentStock crp = new rptNewCurrentStock(); DsCurrentStock.CurrentStockDataTable prt = new LabTestBLL().GetCurrentStock(rbLabTestnMedicines.Checked, rbWithoutLabTest.Checked, rbLabTests.Checked); crp.SetDataSource((DataTable)prt); if (rbLabTestnMedicines.Checked == true) { crp.SetParameterValue("Type", "LabTests&Medicines"); } else if (rbWithoutLabTest.Checked == true) { crp.SetParameterValue("Type", "Medicines "); } else if (rbLabTests.Checked == true) { crp.SetParameterValue("Type", "LabTests"); } FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; //crp.SetParameterValue("Name", BranchName); //crp.SetParameterValue("Address", BranchAddress); if (preview) { frmViewer.ShowDialog(); } else { //frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void GetNextReceiptNumber() { long receiptNumber = new LabTestBLL().GetNextReceiptNumber(); this.txtRecieveNumber.Text = receiptNumber.ToString("0000"); rm.RecieveNumber = receiptNumber; }
private void FrmLabTest_Load(object sender, EventArgs e) { lbtBll = new LabTestBLL(); quotes = lbtBll.GetLabTests(); this.GrdMain.DataSource = this.quotes; this.FormatGrid(); }
private void PrintPreview(bool Privew) { DSIssueBill.DTIssueBillDataTable ds = new LabTestBLL().PrintRecMedBill(rm); crp.SetDataSource((DataTable)ds); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void LoadCurrentSyring() { LabTest lbt = new LabTestBLL().GetSyring(); this.cbxSyring.SelectedValue = lbt.LabTestId; }