本文整理汇总了C#中VNS.Libs.frmPrintPreview类的典型用法代码示例。如果您正苦于以下问题:C# frmPrintPreview类的具体用法?C# frmPrintPreview怎么用?C# frmPrintPreview使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
frmPrintPreview类属于VNS.Libs命名空间,在下文中一共展示了frmPrintPreview类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Baocaohuychot
public static void Baocaohuychot(DataTable m_dtReport, string kieuthuoc_vt, string sTitleReport, string dieukienbaocao, bool theonhom)
{
string tieude = "", reportname = "", reportcode = "thuoc_baocao_huychot_theonhom";
ReportDocument crpt = null;
if (kieuthuoc_vt .Contains("THUOC"))
{
if (theonhom)
{
reportcode = "thuoc_baocao_huychot_theonhom";
}
else
{
reportcode = "thuoc_baocao_huychot";
}
}
else//VTTH
{
if (theonhom)
{
reportcode = "vt_baocao_huychot_theonhom";
}
else
{
reportcode = "vt_baocao_huychot";
}
}
crpt = Utility.GetReport(reportcode, ref tieude, ref reportname);
if (crpt == null) return;
MoneyByLetter _moneyByLetter = new MoneyByLetter();
var objForm = new frmPrintPreview(sTitleReport, crpt, true, m_dtReport.Rows.Count <= 0 ? false : true);
objForm.mv_sReportFileName = Path.GetFileName(reportname);
objForm.mv_sReportCode = reportcode;
Utility.UpdateLogotoDatatable(ref m_dtReport);
try
{
if (theonhom)
m_dtReport.DefaultView.Sort = "stt_hthi_nhom,tenbietduoc";
else
m_dtReport.DefaultView.Sort = "tenbietduoc";
m_dtReport.AcceptChanges();
crpt.SetDataSource(m_dtReport.DefaultView);
Utility.SetParameterValue(crpt, "BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt, "Address", globalVariables.Branch_Address);
Utility.SetParameterValue(crpt, "Phone", globalVariables.Branch_Phone);
Utility.SetParameterValue(crpt, "ParentBranchName", globalVariables.ParentBranch_Name);
Utility.SetParameterValue(crpt, "dieukienbaocao", dieukienbaocao);
Utility.SetParameterValue(crpt, "sTitleReport", tieude);
Utility.SetParameterValue(crpt, "BottomCondition", THU_VIEN_CHUNG.BottomCondition());
Utility.SetParameterValue(crpt, "txttrinhky","");
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
// Utility.DefaultNow(this);
}
catch (Exception ex)
{
Utility.CatchException(ex);
}
}
开发者ID:vmshis2020,项目名称:VMSPharmacy,代码行数:60,代码来源:thuoc_baocao.cs
示例2: Inphieunhapvien
public static void Inphieunhapvien(DataTable m_dtReport, string sTitleReport, DateTime NgayIn)
{
string tieude = "", reportname = "";
var crpt = Utility.GetReport("noitru_phieunhapvien", ref tieude, ref reportname);
if (crpt == null) return;
THU_VIEN_CHUNG.CreateXML(m_dtReport, "noitru_phieunhapvien.xml");
MoneyByLetter _moneyByLetter = new MoneyByLetter();
var objForm = new frmPrintPreview(sTitleReport, crpt, true, m_dtReport.Rows.Count <= 0 ? false : true);
// string tinhtong = TinhTong(m_dtReport);
Utility.UpdateLogotoDatatable(ref m_dtReport);
try
{
crpt.SetDataSource(m_dtReport);
objForm.mv_sReportFileName = Path.GetFileName(reportname);
objForm.mv_sReportCode = "noitru_phieunhapvien";
Utility.SetParameterValue(crpt,"ParentBranchName", globalVariables.ParentBranch_Name);
Utility.SetParameterValue(crpt,"BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt,"sCurrentDate", Utility.FormatDateTimeWithThanhPho(NgayIn));
Utility.SetParameterValue(crpt,"sTitleReport", tieude);
Utility.SetParameterValue(crpt,"BottomCondition", THU_VIEN_CHUNG.BottomCondition());
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
}
catch (Exception ex)
{
if (globalVariables.IsAdmin)
{
Utility.ShowMsg(ex.ToString());
}
}
}
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:33,代码来源:noitru_baocao.cs
示例3: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
try
{
string s ="";
if (dtpFromDate.Value.Date == dtpToDate.Value.Date)
{
s = string.Format("{0}Ngày {1}", s, dtpFromDate.Value.ToString("dd/MM/yyyy"));
}
else
{
s = string.Format("{0}{1}", s,
string.Format("Thời gian từ ngày {0} đến ngày {1}", dtpFromDate.Value.ToString("dd/MM/yyyy"),
dtpToDate.Value.ToString("dd/MM/yyyy")));
}
var crpt = new Crp_DSBN_TestType();
var oForm = new frmPrintPreview("In Báo cáo lưu", crpt, true, true);
crpt.SetDataSource(dt);
crpt.DataDefinition.FormulaFields["Formula_1"].Text = "";
crpt.SetParameterValue("TongBenhNhan", dt.Rows.Count);
crpt.SetParameterValue("TestType_Name",cboTestType.Text.ToUpper());
crpt.SetParameterValue("strFromDateToDate", s);
crpt.SetParameterValue("ParentBranchName", ManagementUnit.gv_sParentBranchName);
crpt.SetParameterValue("BranchName", ManagementUnit.gv_sBranchName);
crpt.SetParameterValue("sCurrentDate", dtCreatePrint.Value);
oForm.crptViewer.ReportSource = crpt;
oForm.ShowDialog();
oForm.Dispose();
}
catch (Exception ex)
{
Utility.ShowMsg(ex.Message);
}
}
开发者ID:khaha2210,项目名称:CodeNewTeam,代码行数:34,代码来源:frm_DanhSachBenhNhan_TestType.cs
示例4: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
try
{
ReportDocument crpt;
string s;
if (cboTestType.SelectedValue.ToString() == "-1")
{
s = "TẤT CẢ CÁC LOẠI XÉT NGHIỆM";
}
else
{
s = string.Format("XÉT NGHIỆM {0}", cboTestType.SelectedText.ToUpper());
}
var ds =
SPs.SpBaoCaoXoaKetQua(dtpFromDate.Value.ToString("yyyy/MM/dd"),
dtpToDate.Value.ToString("yyyy/MM/dd"),
Utility.Int32Dbnull(cboTestType.SelectedValue, -1),
Utility.sDbnull(cboUserName.SelectedValue, "")).GetDataSet();
if (cboReportType.SelectedIndex == 1)
{
crpt = new crpt_BAOCAO_XOA_KETQUA_TONGHOP();
dt = ds.Tables[0];
}
else
{
crpt = new crpt_BAOCAO_SUAXOA_KETQUA_CHITIET();
dt = ds.Tables[1];
}
if (dt.Rows.Count <= 0)
{
Utility.ShowMsg("Không có dữ liệu để báo cáo");
}
else
{
var oForm = new frmPrintPreview("In báo cáo sửa xóa", crpt, true, true);
crpt.SetDataSource(dt);
crpt.DataDefinition.FormulaFields["Formula_1"].Text = "";
//crpt.SetParameterValue("TongBenhNhan", dt.Rows.Count);
crpt.SetParameterValue("TestType_Name", s);
crpt.SetParameterValue("ParentBranchName", ManagementUnit.gv_sParentBranchName);
crpt.SetParameterValue("BranchName", ManagementUnit.gv_sBranchName);
//crpt.SetParameterValue("sCurrentDate", dtpDatePrintFrom.Value);
oForm.crptViewer.ReportSource = crpt;
oForm.ShowDialog();
oForm.Dispose();
}
}
catch (Exception ex)
{
Utility.ShowMsg(ex.Message);
}
}
开发者ID:khaha2210,项目名称:CodeNewTeam,代码行数:54,代码来源:frm_BaoCao_SuaXoaKetQua.cs
示例5: cmdPrint_Click
private void cmdPrint_Click(object sender, EventArgs e)
{
try
{
LayDuLieu();
if (dt.Rows.Count<=0 || dtRawResult == null)
{
Utility.ShowMsg("Không có dữ liệu để báo cáo");
}
else
{
string s = "";
if (dtpFromDate.Value.Date == dtpToDate.Value.Date)
{
s = string.Format("{0}Ngày {1}", s, dtpFromDate.Value.ToString("dd/MM/yyyy"));
}
else
{
s = string.Format("{0}{1}", s,
string.Format("Từ ngày {0} đến ngày {1}",
dtpFromDate.Value.ToString("dd/MM/yyyy"),
dtpToDate.Value.ToString("dd/MM/yyyy")));
}
var crpt = new VD_crpt_DailyParamTestReport();
var oForm = new frmPrintPreview("In Báo cáo lưu", crpt, true, true);
crpt.SetDataSource(dt);
crpt.DataDefinition.FormulaFields["Formula_1"].Text = "";
crpt.SetParameterValue("sFromDateToDate", s);
crpt.SetParameterValue("TongSoBenhNhan", dt.Rows.Count);
crpt.SetParameterValue("ParentBranchName", ManagementUnit.gv_sParentBranchName);
crpt.SetParameterValue("BranchName", ManagementUnit.gv_sBranchName);
crpt.SetParameterValue("sPrintDate", dtpDatePrint.Value.ToString("dd/MM/yyyy"));
oForm.crptViewer.ReportSource = crpt;
oForm.ShowDialog();
oForm.Dispose();
}
}
catch (Exception ex)
{
Utility.ShowMsg("Lỗi" + ex, "Thông Báo", MessageBoxIcon.Warning);
}
}
开发者ID:khaha2210,项目名称:CodeNewTeam,代码行数:42,代码来源:frm_GTVT_BAOCAO_TRUC.cs
示例6: InphieuDieuTri
public static void InphieuDieuTri(DataTable dtPrint, DateTime ngayin)
{
string tieude = "", reportname = "";
var crpt = Utility.GetReport("noitru_phieudieutri", ref tieude, ref reportname);
if (crpt == null) return;
//var crpt = new crpt_PhieuDieuTri();
var objForm = new frmPrintPreview("IN PHIẾU ĐIỀU TRỊ", crpt, true, true);
crpt.SetDataSource(dtPrint);
objForm.mv_sReportFileName = Path.GetFileName(reportname);
objForm.mv_sReportCode = "noitru_phieudieutri";
Utility.SetParameterValue(crpt, "ParentBranchName", globalVariables.ParentBranch_Name);
Utility.SetParameterValue(crpt, "BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt, "CurrentDate", Utility.FormatDateTime(ngayin));
Utility.SetParameterValue(crpt,"sTitleReport", tieude);
Utility.SetParameterValue(crpt, "BottomCondition", THU_VIEN_CHUNG.BottomCondition());
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
objForm.Dispose();
}
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:20,代码来源:frm_InPhieudieutri.cs
示例7: InphieuHuythuoc
public static void InphieuHuythuoc(int IDPhieuNhap, string sTitleReport, DateTime NgayIn)
{
DataTable m_dtReport = SPs.ThuocLaythongtininphieuXuatkhothuoc(IDPhieuNhap).GetDataSet().Tables[0];
if (m_dtReport.Rows.Count <= 0)
{
Utility.ShowMsg("Không tìm thấy thông tin ", "Thông báo", MessageBoxIcon.Warning);
return;
}
MoneyByLetter _moneyByLetter = new MoneyByLetter();
string tinhtong = TinhTong(m_dtReport, TPhieuNhapxuatthuocChitiet.ThanhTienColumn.ColumnName);
THU_VIEN_CHUNG.CreateXML(m_dtReport, "thuoc_bienban_huythuoc");
string tieude = "", reportname = "";
var crpt = Utility.GetReport("thuoc_bienban_huythuoc", ref tieude, ref reportname);
Utility.UpdateLogotoDatatable(ref m_dtReport);
var objForm = new frmPrintPreview(sTitleReport, crpt, true, true);
try
{
m_dtReport.AcceptChanges();
crpt.SetDataSource(m_dtReport);
objForm.mv_sReportFileName = Path.GetFileName(reportname);
objForm.mv_sReportCode = "thuoc_bienban_huythuoc";
Utility.SetParameterValue(crpt,"ParentBranchName", globalVariables.ParentBranch_Name);
Utility.SetParameterValue(crpt,"BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt,"sCurrentDate", Utility.FormatDateTimeWithThanhPho(NgayIn));
Utility.SetParameterValue(crpt,"sMoneyLetter", _moneyByLetter.sMoneyToLetter(tinhtong));
Utility.SetParameterValue(crpt,"sTitleReport", tieude);
Utility.SetParameterValue(crpt,"BottomCondition", THU_VIEN_CHUNG.BottomCondition());
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
}
catch (Exception ex)
{
if (globalVariables.IsAdmin)
{
Utility.ShowMsg(ex.ToString());
}
}
}
开发者ID:vmshis2015,项目名称:VMSPharmacy,代码行数:41,代码来源:thuoc_Phieuin_Nhapxuatkhothuoc.cs
示例8: cmdINPHIEU_Click
private void cmdINPHIEU_Click(object sender, EventArgs e)
{
try
{
string s = "";
if (dtpFromDate.Value.Date == dtpToDate.Value.Date)
{
s = string.Format("{0}Ngày {1}", s, dtpFromDate.Value.ToString("dd/MM/yyyy"));
}
else
{
s = string.Format("{0}{1}", s,
string.Format("Từ ngày {0} đến ngày {1}", dtpFromDate.Value.ToString("dd/MM/yyyy"),
dtpToDate.Value.ToString("dd/MM/yyyy")));
}
dtSoghichep = BaocaoSoghichep(dtpFromDate.Value,dtpToDate.Value).GetDataSet().Tables[0];
int totalBN = dtSoghichep.Rows.Count;
if (dtSoghichep.Rows.Count <= 0)
{
Utility.ShowMsg("Không có dữ liệu để in");
}
else
{
var crpt = new crpt_SoGhiChep();
var objForm = new frmPrintPreview("In Báo Cáo", crpt, true, true);
crpt.SetDataSource(dtSoghichep);
crpt.DataDefinition.FormulaFields["Formula_1"].Text = "";
crpt.SetParameterValue("BranchName", ManagementUnit.gv_sBranchName);
crpt.SetParameterValue("ParentBranchName", ManagementUnit.gv_sParentBranchName);
crpt.SetParameterValue("TestDate",s);
crpt.SetParameterValue("PrintDate",dtpPrintDate.Value);
crpt.SetParameterValue("TotalBN", totalBN);
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
}
}
catch (Exception exception)
{
Utility.ShowMsg("Lỗi trong quá trình xuất báo cáo" + exception);
}
}
开发者ID:khaha2210,项目名称:CodeNewTeam,代码行数:41,代码来源:SO_GHI_CHEP.cs
示例9: cmdINPHIEU_Click
private void cmdINPHIEU_Click(object sender, EventArgs e)
{
try
{
dtPatient = SPs.BaocaoSluongXetnghiemTheodoituong(dtpFromDate.Value.Date, dtpToDate.Value.Date).GetDataSet().Tables[0];
if (dtPatient.Rows.Count < 0)
{
Utility.ShowMsg("Không có dữ liệu để in");
}
else
{
string s = "";
s = string.Format("{0}{1}", s,
string.Format("Từ ngày {0} đến ngày {1}",
dtpFromDate.Value.ToString("dd/MM/yyyy"),
dtpToDate.Value.ToString("dd/MM/yyyy")));
Utility.UpdateLogotoDatatable(ref dtPatient);
CRPT_GTVT_BAOCAO_SLUONG_BNHAN_THEODOITUONG crpt = new CRPT_GTVT_BAOCAO_SLUONG_BNHAN_THEODOITUONG();
var objForm = new frmPrintPreview("In Báo Cáo", crpt, true, true);
crpt.SetDataSource(dtPatient);
crpt.SetParameterValue("ParentBranchName", globalVariables.ParentBranch_Name);
crpt.SetParameterValue("BranchName", globalVariables.Branch_Name);
crpt.SetParameterValue("sTitleReport", label7.Text);
crpt.SetParameterValue("sTuNgayDenNgay", s);
crpt.SetParameterValue("sCurrentDate", Utility.FormatDateTime(dtNgayInPhieu.Value));
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
Utility.DefaultNow(this);
}
}
catch (Exception ex)
{
Utility.ShowMsg(ex.ToString());
}
}
开发者ID:khaha2210,项目名称:CodeNewTeam,代码行数:38,代码来源:frm_GTVT_BAOCAOSLBN_THEODOITUONG.cs
示例10: InphieuDutru
public static void InphieuDutru(int IDPhieuNhap, string sTitleReport, DateTime NgayIn)
{
DataTable m_dtReport = SPs.ThuocLaydulieuinphieuchuyenkho2lien(IDPhieuNhap).GetDataSet().Tables[0];
if (m_dtReport.Rows.Count <= 0)
{
Utility.ShowMsg("Không tìm thấy thông tin ", "Thông báo", MessageBoxIcon.Warning);
return;
}
THU_VIEN_CHUNG.CreateXML(m_dtReport, "thuoc_phieudutru");
string tieude = "", reportname = "";
var crpt = Utility.GetReport("thuoc_phieudutru", ref tieude, ref reportname);
Utility.UpdateLogotoDatatable(ref m_dtReport);
frmPrintPreview objForm = new frmPrintPreview(sTitleReport, crpt, true, true);
try
{
m_dtReport.AcceptChanges();
crpt.SetDataSource(m_dtReport);
objForm.mv_sReportFileName = Path.GetFileName(reportname);
objForm.mv_sReportCode = "thuoc_phieudutru";
Utility.SetParameterValue(crpt,"ParentBranchName", globalVariables.ParentBranch_Name);
Utility.SetParameterValue(crpt,"BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt,"sCurrentDate", Utility.FormatDateTimeWithThanhPho(NgayIn));
Utility.SetParameterValue(crpt,"sTitleReport", tieude);
Utility.SetParameterValue(crpt,"BottomCondition", THU_VIEN_CHUNG.BottomCondition());
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
}
catch (Exception ex)
{
if (globalVariables.IsAdmin)
{
Utility.ShowMsg(ex.ToString());
}
}
}
开发者ID:vmshis2015,项目名称:VMSPharmacy,代码行数:38,代码来源:thuoc_Phieuin_Nhapxuatkhothuoc.cs
示例11: KYDONG_INPHIEU_DICHVU
public void KYDONG_INPHIEU_DICHVU(DataTable m_dtReportPhieuThu, DateTime NgayInPhieu, string sTitleReport,string khogiay)
{
Utility.UpdateLogotoDatatable(ref m_dtReportPhieuThu);
ReportDocument reportDocument = new ReportDocument();
string tieude="", reportname = "";
switch (khogiay)
{
case "A4":
reportDocument = Utility.GetReport("thanhtoan_Bienlai_Dichvu_A4" ,ref tieude,ref reportname);
break;
case "A5":
reportDocument = Utility.GetReport("thanhtoan_13" ,ref tieude,ref reportname);
break;
}
if (reportDocument == null) return;
var crpt = reportDocument;
decimal tong = m_dtReportPhieuThu.AsEnumerable().Sum(c => c.Field<decimal>("TONG_BN"));
var objForm = new frmPrintPreview("", crpt, true, true);
//try
//{
crpt.SetDataSource(m_dtReportPhieuThu);
//crpt.DataDefinition.FormulaFields["Formula_1"].Text = Strings.Chr(34) + " ".Replace("#$X$#", Strings.Chr(34) + "&Chr(13)&" + Strings.Chr(34)) + Strings.Chr(34);
Utility.SetParameterValue(crpt,"ParentBranchName", globalVariables.ParentBranch_Name);
Utility.SetParameterValue(crpt,"BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt,"Telephone", globalVariables.Branch_Phone);
Utility.SetParameterValue(crpt,"Address", globalVariables.Branch_Address);
// Utility.SetParameterValue(crpt,"DateTime", Utility.FormatDateTime(dtCreateDate.Value));
Utility.SetParameterValue(crpt,"CurrentDate", Utility.FormatDateTime(NgayInPhieu));
Utility.SetParameterValue(crpt,"sTitleReport", sTitleReport);
Utility.SetParameterValue(crpt,"sMoneyCharacter",
new MoneyByLetter().sMoneyToLetter(Utility.sDbnull(tong)));
Utility.SetParameterValue(crpt,"BottomCondition", THU_VIEN_CHUNG.BottomCondition());
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
}
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:38,代码来源:INPHIEU_THANHTOAN_NGOAITRU.cs
示例12: InPhieuKCB_DV
public static void InPhieuKCB_DV(DataTable m_dtReport, string sTitleReport,string KhoGiay)
{
ReportDocument reportDocument=new ReportDocument();
string tieude="", reportname = "";
switch (KhoGiay)
{
case "A4":
reportDocument =Utility.GetReport("tiepdon_PhieuKCB_Dvu_A4",ref tieude,ref reportname);
break;
case "A5":
reportDocument = Utility.GetReport("tiepdon_PhieuKCB_Dvu_A5" ,ref tieude,ref reportname);
break;
}
if (reportDocument == null) return;
var crpt = reportDocument;
var objForm = new frmPrintPreview(sTitleReport, crpt, true, m_dtReport.Rows.Count <= 0 ? false : true);
try
{
m_dtReport.AcceptChanges();
crpt.SetDataSource(m_dtReport);
//crpt.DataDefinition.FormulaFields["Formula_1"].Text = Strings.Chr(34) + " PHÒNG TIẾP ĐÓN ".Replace("#$X$#", Strings.Chr(34) + "&Chr(13)&" + Strings.Chr(34)) + Strings.Chr(34);
Utility.SetParameterValue(crpt,"Phone", globalVariables.Branch_Phone + globalVariables.SOMAYLE);
Utility.SetParameterValue(crpt,"Address", globalVariables.Branch_Address);
Utility.SetParameterValue(crpt,"BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt,"CurrentDate", Utility.FormatDateTime(globalVariables.SysDate));
Utility.SetParameterValue(crpt,"sTitleReport", sTitleReport);
Utility.SetParameterValue(crpt,"BottomCondition", THU_VIEN_CHUNG.BottomCondition());
objForm.crptViewer.ReportSource = crpt;
if (Utility.isPrintPreview(PropertyLib._MayInProperties.TenMayInPhieuKCB, PropertyLib._MayInProperties.PreviewPhieuKCB))
{
objForm.SetDefaultPrinter(PropertyLib._MayInProperties.TenMayInPhieuKCB, 0);
objForm.ShowDialog();
}
else
{
objForm.addTrinhKy_OnFormLoad();
crpt.PrintOptions.PrinterName = PropertyLib._MayInProperties.TenMayInPhieuKCB;
crpt.PrintToPrinter(1, false, 0, 0);
}
}
catch (Exception ex)
{
Utility.ShowMsg(ex.ToString());
}
}
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:49,代码来源:KCB_INPHIEU.cs
示例13: InPhieuKCB
private void InPhieuKCB()
{
try
{
int IdKham = -1;
string tieude="", reportname = "";
ReportDocument crpt = Utility.GetReport("tiepdon_PHIEUKHAM_NHIET",ref tieude,ref reportname);
if (crpt == null) return;
var objPrint = new frmPrintPreview("IN PHIẾU KHÁM", crpt, true, true);
IdKham = GetrealRegID();
KcbDangkyKcb objRegExam = KcbDangkyKcb.FetchByID(IdKham);
DmucKhoaphong lDepartment = DmucKhoaphong.FetchByID(objRegExam.IdPhongkham);
Utility.SetParameterValue(crpt,"PHONGKHAM", Utility.sDbnull(lDepartment.MaKhoaphong));
Utility.SetParameterValue(crpt,"STT", Utility.sDbnull(objRegExam.SttKham, ""));
Utility.SetParameterValue(crpt,"BENHAN", Utility.sDbnull(grdList.CurrentRow.Cells[KcbLuotkham.Columns.MaLuotkham].Value, ""));
Utility.SetParameterValue(crpt,"TENBN", Utility.sDbnull(grdList.CurrentRow.Cells[KcbDanhsachBenhnhan.Columns.TenBenhnhan].Value, ""));
Utility.SetParameterValue(crpt,"GT_TUOI", Utility.sDbnull(grdList.CurrentRow.Cells[KcbDanhsachBenhnhan.Columns.GioiTinh].Value, "") + ", " + Utility.sDbnull(grdList.CurrentRow.Cells["Tuoi"].Value, "") + " tuổi");
string SOTHE = "Không có thẻ";
SOTHE = Utility.sDbnull(grdList.CurrentRow.Cells[KcbLuotkham.Columns.MatheBhyt].Value, "Không có thẻ");
Utility.SetParameterValue(crpt,"SOTHE", SOTHE);
if (Utility.isPrintPreview(PropertyLib._MayInProperties.TenMayInPhieuKCB, PropertyLib._MayInProperties.PreviewPhieuKCB))
objPrint.ShowDialog();
else
{
crpt.PrintOptions.PrinterName = PropertyLib._MayInProperties.TenMayInPhieuKCB;
crpt.PrintToPrinter(1, false, 0, 0);
}
}
catch (Exception ex)
{
Utility.ShowMsg("Có lỗi trong quá trình in phiếu khám-->\n" + ex.Message);
}
}
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:34,代码来源:frm_KCB_DSACH_BNHAN.cs
示例14: PrintPhieuThu_DM
/// <summary>
/// hàm thực hiện việc in phieus thu của dệt may
/// </summary>
/// <param name="sTitleReport"></param>
private void PrintPhieuThu_DM(string sTitleReport,decimal TONG_TIEN)
{
Utility.WaitNow(this);
string tieude="", reportname = "";
var crpt = Utility.GetReport("thanhtoan_PhieuThu_DM",ref tieude,ref reportname);
if (crpt == null) return;
var objForm = new frmPrintPreview("", crpt, true, true);
try
{
crpt.SetDataSource(m_dtReportPhieuThu);
// //crpt.DataDefinition.FormulaFields["Formula_1"].Text = Strings.Chr(34) + " Nhân viên ".Replace("#$X$#", Strings.Chr(34) + "&Chr(13)&" + Strings.Chr(34)) + Strings.Chr(34);
Utility.SetParameterValue(crpt,"ParentBranchName", globalVariables.ParentBranch_Name);
Utility.SetParameterValue(crpt,"BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt,"DateTime", Utility.FormatDateTime(globalVariables.SysDate));
Utility.SetParameterValue(crpt,"CurrentDate", Utility.FormatDateTime(globalVariables.SysDate));
Utility.SetParameterValue(crpt,"sTitleReport", sTitleReport);
Utility.SetParameterValue(crpt,"CharacterMoney", new MoneyByLetter().sMoneyToLetter(TONG_TIEN.ToString()));
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
Utility.DefaultNow(this);
}
catch (Exception ex)
{
Utility.DefaultNow(this);
}
}
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:30,代码来源:frm_THANHTOAN_NOITRU.cs
示例15: cmdInPhieuXN_Click
/// <summary>
/// hàm thực hiện việc in phiếu báo cáo tổng hợp
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cmdInPhieuXN_Click(object sender, EventArgs e)
{
_dtData =BAOCAO_NGOAITRU.BaocaoMiengiam(Utility.Int16Dbnull(txtNhanvien.MyID,-1),chkByDate.Checked?dtFromDate.Value.ToString("dd/MM/yyyy"):"01/01/1900",
chkByDate.Checked?dtToDate.Value.ToString("dd/MM/yyyy"):"01/01/1900");
Utility.SetDataSourceForDataGridEx(grdList, _dtData, false, true, "1=1", "");
Utility.UpdateLogotoDatatable(ref _dtData);
THU_VIEN_CHUNG.CreateXML(_dtData, "baocao_miengiam.xml");
if (_dtData.Rows.Count <= 0)
{
Utility.ShowMsg("Không tìm thấy dữ liệu báo cáo theo điều kiện bạn chọn", "Thông báo", MessageBoxIcon.Information);
return;
}
string Condition = string.Format("Từ ngày {0} đến {1} - Thu ngân viên :{2} ", dtFromDate.Text, dtToDate.Text,txtNhanvien.Text);
var crpt = Utility.GetReport("baocao_miengiam", ref tieude, ref reportname);
if (crpt == null) return;
string StaffName = globalVariables.gv_strTenNhanvien;
if (string.IsNullOrEmpty(globalVariables.gv_strTenNhanvien)) StaffName = globalVariables.UserName;
try
{
frmPrintPreview objForm = new frmPrintPreview(tieude, crpt, true, _dtData.Rows.Count <= 0 ? false : true);
//try
//{
crpt.SetDataSource(_dtData);
objForm.mv_sReportFileName = Path.GetFileName(reportname);
objForm.mv_sReportCode = "baocao_miengiam";
Utility.SetParameterValue(crpt,"StaffName", StaffName);
Utility.SetParameterValue(crpt, "ParentBranchName", globalVariables.ParentBranch_Name);
Utility.SetParameterValue(crpt, "BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt, "Address", globalVariables.Branch_Address);
Utility.SetParameterValue(crpt, "Phone", globalVariables.Branch_Phone);
Utility.SetParameterValue(crpt, "FromDateToDate", Condition);
Utility.SetParameterValue(crpt, "sTitleReport", tieude);
Utility.SetParameterValue(crpt, "Tongtien_chu", new MoneyByLetter().sMoneyToLetter(_dtData.Compute("SUM(tongtien_chietkhau)", "1=1").ToString()));
Utility.SetParameterValue(crpt, "sCurrentDate", Utility.FormatDateTimeWithThanhPho(dtNgayInPhieu.Value));
Utility.SetParameterValue(crpt, "BottomCondition", THU_VIEN_CHUNG.BottomCondition());
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
}
catch (Exception ex)
{
Utility.CatchException(ex);
}
}
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:52,代码来源:frm_baocaomiengiam.cs
示例16: cmdInPhieuXN_Click
/// <summary>
/// hàm thực hiên viecj in báo cáo doanh thu tiền khám chữa bệnh viện phí
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cmdInPhieuXN_Click(object sender, EventArgs e)
{
_mabschidinh = "-1";
_idThuoc = -1;
// Lấy Id Bác sỹ
if (!string.IsNullOrEmpty(cboBacSyChiDinh.Text))
{
var query = (from chk in cboBacSyChiDinh.CheckedValues.AsEnumerable()
let x = Utility.sDbnull(chk)
select x).ToArray();
if (query.Count() > 0)
{
_mabschidinh = string.Join(",", query);
}
}
//Truyền dữ liệu vào datatable
DataTable m_dtReport = BAOCAO_THUOC.ThuocBaocaoTinhhinhkedonthuocTheobacsy(Utility.Int32Dbnull(cboStock.SelectedValue, -1), Utility.Int32Dbnull(cboDoiTuong.SelectedValue, -1),
_mabschidinh, _idThuoc, chkByDate.Checked ? dtFromDate.Value : Convert.ToDateTime("01/01/1900"), chkByDate.Checked ? dtToDate.Value : globalVariables.SysDate,Utility.Int16Dbnull(cboTrangthai.SelectedValue, -1));
if (m_dtReport == null) return;
THU_VIEN_CHUNG.CreateXML(m_dtReport, "thuoc_baocaokedon_theobacsy.xml");
//Kiểm tra dữ liệu
if (m_dtReport.Rows.Count <= 0)
{
Utility.ShowMsg("Không tìm thấy dữ liệu cho báo cáo", "Thông báo", MessageBoxIcon.Warning);
return;
}
//Truyền tổng tiền vào text và chuyển qua tiền bằng chữ
Janus.Windows.GridEX.GridEXColumn gridExColumnTong = grdList.RootTable.Columns["thanh_tien"];
decimal tong =
Utility.DecimaltoDbnull(grdList.GetTotal(gridExColumnTong, Janus.Windows.GridEX.AggregateFunction.Sum));
m_dtReport.AcceptChanges();
Utility.UpdateLogotoDatatable(ref m_dtReport);
//Truyền dữ liệu vào datagrid-view
Utility.SetDataSourceForDataGridEx(grdList, m_dtReport, false, true, "1=1", "");
//Lấy chuỗi condition truyền vào biến ?FromDateToDate trên crpt
string Condition = string.Format("Từ ngày {0} đến {1}- Đối tượng {2} - Thuộc kho :{3} - Bác sỹ: {4}", dtFromDate.Text, dtToDate.Text,
cboDoiTuong.SelectedIndex > 0
? Utility.sDbnull(cboDoiTuong.SelectedValue)
: "Tất cả",
cboStock.SelectedIndex > 0
? Utility.sDbnull(cboStock.SelectedValue)
: "Tất cả",
string.IsNullOrEmpty(cboBacSyChiDinh.Text) ? "Tất cả" : cboBacSyChiDinh.Text);
//Lấy tên người tạo báo cáo và gọi crpt
string StaffName = globalVariables.gv_strTenNhanvien;
string tieude = "", reportname = "";
var crpt = Utility.GetReport("thuoc_baocaokedon_theobacsy", ref tieude, ref reportname);
if (crpt == null) return;
if (string.IsNullOrEmpty(globalVariables.gv_strTenNhanvien)) StaffName = globalVariables.UserName;
try
{
frmPrintPreview objForm = new frmPrintPreview(baocaO_TIEUDE1.TIEUDE, crpt, true, m_dtReport.Rows.Count <= 0 ? false : true);
crpt.SetDataSource(m_dtReport);
objForm.mv_sReportFileName = Path.GetFileName(reportname);
objForm.mv_sReportCode = "thuoc_baocaokedon_theobacsy";
Utility.SetParameterValue(crpt, "StaffName", StaffName);
Utility.SetParameterValue(crpt, "BranchName", globalVariables.Branch_Name);
Utility.SetParameterValue(crpt, "Address", globalVariables.Branch_Address);
Utility.SetParameterValue(crpt, "Phone", globalVariables.Branch_Phone);
Utility.SetParameterValue(crpt, "FromDateToDate", Condition);
Utility.SetParameterValue(crpt, "sTitleReport", baocaO_TIEUDE1.TIEUDE);
Utility.SetParameterValue(crpt, "TienBangChu", _moneyByLetter.sMoneyToLetter(tong.ToString()));
Utility.SetParameterValue(crpt, "sCurrentDate", Utility.FormatDateTimeWithThanhPho(dtNgayInPhieu.Value));
Utility.SetParameterValue(crpt, "BottomCondition", THU_VIEN_CHUNG.BottomCondition());
Utility.SetParameterValue(crpt, "Department_Name", globalVariables.KhoaDuoc);
objForm.crptViewer.ReportSource = crpt;
objForm.ShowDialog();
}
catch (Exception exception)
{
}
}
开发者ID:vmshis2020,项目名称:VMSPharmacy,代码行数:82,代码来源:frm_baocao_thuockedon_theobacsy.cs
示例17: IN_BAOCAO_TIENKHAM_DICHVU
private void IN_BAOCAO_TIENKHAM_DICHVU()
{
DataTable v_dtData = new DataTable();
v_dtData =
GtvtBaocaoTongsluongLoaixetnghiem(
chkFormDate.Checked ? dtFromDate.Value : Convert.ToDateTime("01/01/1900"),
chkFormDate.Checked ? dtToDate.Value : Utility.getSysDate(),
Utility.Int32Dbnull(cboObjectType.SelectedValue, -1),
Utility.Int32Dbnull(cboDepartment.SelectedValue, -1),
Utility.Int32Dbnull(cboLoaiXetnghiem.SelectedValue, -1),
Utility.Int32Dbnull(cboHos_Status.SelectedValue, -1),chkTongKhoa.Checked?1:0).GetDataSet().Tables[0];
// SubSonic.StoredProcedure.
if (v_dtData.Rows.Count <= 0)
{
Utility.ShowMsg("Không tìm thấy bản ghi nào", "Thông báo");
return;
}
string sTungayDenNgay = dtFromDate.Value.Date != dtToDate.Value.Date
? string.Format("{0} --- đến --- {1}", Getsday(dtFromDate.Value),
Getsday(dtToDate.Value))
: Getsday(dtFromDate.Value);
string tieude = "", reportname = "";
string sTitleReport;
var crpt = new ReportDocument();
if(chkTongLoaiXN.Checked)
{
crpt = Utility.GetReport("CRTP_GTVT_BAOCAO_SLUONG_XNGHIEM_THEO_TLOAI", ref tieude, ref reportname);
}
else
{
crpt = Utility.GetReport("CRPT_GTVT_BAOCAO_SOLUONG_LOAIXETNGHIEM", ref tieude, ref reportname);
}
var objForm = new frmPrintPreview("Báo cáo thống kê số lượng xét nghiệm", crpt, true, v_dtData.Rows.Count <= 0 ? false : true);
Utility.UpdateLogotoDatatable(ref v_dtData);
crpt.SetDataSource(v_dtData);
objForm.crptTrinhKyName = Path.GetFileName(reportname);
crpt.SetParameterValue("ParentBranchName", globalVariables.ParentBranch_Name);
crpt.SetParameterValue("BranchName", globalVariables.Branch_Name);
crpt.SetParameterValue("sTitleReport", "BÁO CÁO SỐ L
|
请发表评论