本文整理汇总了C#中VNS.Libs.frmPrintPreview.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# frmPrintPreview.Dispose方法的具体用法?C# frmPrintPreview.Dispose怎么用?C# frmPrintPreview.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VNS.Libs.frmPrintPreview
的用法示例。
在下文中一共展示了frmPrintPreview.Dispose方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: 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();
}
示例3: 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);
}
}
示例4: 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);
}
}
示例5: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
PrintData();
try
{
if(dt.Rows.Count<=0)
{
Utility.ShowMsg("Không có dữ liệu để báo cáo","Thông Báo",MessageBoxIcon.Information);
}
else
{
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 crpt = new Crpt_BaoCaoLuu_NoBarcode();
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",s );
crpt.SetParameterValue("ParentBranchName", ManagementUnit.gv_sParentBranchName);
crpt.SetParameterValue("BranchName", ManagementUnit.gv_sBranchName);
crpt.SetParameterValue("sCurrentDate", DateTime.Now.Date);
oForm.crptViewer.ReportSource = crpt;
oForm.ShowDialog();
oForm.Dispose();
}
}
catch (Exception ex)
{
Utility.ShowMsg("Lỗi" + ex,"Thông báo",MessageBoxIcon.Warning);
}
}
示例6: Print
public void Print(bool Quick,string printerName)
{
try
{
if (Crpt == null && !string.IsNullOrEmpty(StrCode))
{
Crpt = GetCrptFromAssembly(StrCode);
}
if (ValidData())
{
bool hasSubReport = CheckHasSubReport(Crpt);
if (!hasSubReport)
{
Crpt.SetDataSource(ReportSourceTable);
if(Utility.sDbnull(printDateTime) !=null)
{
Crpt.SetParameterValue("PrintDate",printDateTime);
}
//if(SysPara.ParamaterReport.ToUpper() == "THANHNHAN")
//{
// var sFullName =
// new Select(TblUser.Columns.SFullName).From(TblUser.Schema.Name).Where(
// TblUser.Columns.PkSuid).IsEqualTo(Utilities.gv_sUID).ExecuteScalar();
// if (sFullName != null)
// {
// Crpt.SetParameterValue("sTenUser", sFullName);
// }
// else
// {
// Crpt.SetParameterValue("sTenUser"," ");
// }
//}
ReportDocument reportDocument=new ReportDocument();
string tieude="", reportname = "";
SetReportParameter(Crpt);
var oForm = new frmPrintPreview(FormPreviewTitle, Crpt, true, true);
oForm.ReportSourceTable = ReportSourceTable;
// FieldObject mv_oRptFieldObj = Crpt.ReportDefinition.ReportObjects["Field150181"] as FieldObject;
// Crpt.PrintToPrinter();
if (Quick)
{
oForm.crptTrinhKyName = Path.GetFileName(reportname);
//mv_oNguoiKy = new VietBaIT.LABLink.Reports.Class.cls_SignInfor(mv_oRptFieldObj, "", Crpt.ToString(), Crpt.DataDefinition.FormulaFields["Formula_1"].Text);
//mv_oNguoiKy = new cls_SignInfor(Crpt.ToString(), "",ReportSourceTable,);
//chkPrint_CheckedChanged(chkPrint, New System.EventArgs)
if (mv_oNguoiKy._TonTai)
{
Crpt.DataDefinition.FormulaFields["Formula_1"].Text = Strings.Chr(34) +
mv_oNguoiKy.mv_NOI_DUNG.Replace(
"&NHANVIEN",
globalVariables.UserName)
.Replace("\t",
Strings.Chr(34) +
"&Chr(13)&" +
Strings.Chr(34)) +
Strings.Chr(34);
}
else
{
Crpt.DataDefinition.FormulaFields["Formula_1"].Text = "";
}
Crpt.PrintOptions.PrinterName = printerName;
Crpt.PrintToPrinter(0, true, 0, 0);
Crpt.Dispose();
CleanTemporaryFolders();
}
else
{
oForm.ShowDialog();
oForm.Dispose();
}
}
else
{
//DataTable dt = new Select().From(TblTrinhky.Schema.Name).Where(TblTrinhky.Columns.ReportName).
// IsEqualTo(Crpt.GetClassName()).ExecuteDataSet().Tables[0];
string sql = string.Format("SELECT * \n"
+ "FROM Sys_Trinhky With (NOLOCK) \n"
+ "WHERE ReportName = N'{0}'", Crpt.GetClassName());
var x = new InlineQuery().ExecuteAsCollection<SysTrinhkyCollection>(sql);
if (x.Count > 0)
Utility.GetDataRow(ReportParameterTable, colName, "Formula_1")[colValue] = Strings.Chr(34) +
Utility.sDbnull(
x[0]
.ObjectContent) +
Strings.Chr(34);
Crpt.SetDataSource(ReportSourceTable);
SetReportParameter(Crpt);
if (!ReportSourceTable.Columns.Contains("ParentBranchName"))
ReportSourceTable.Columns.Add("ParentBranchName");
if (!ReportSourceTable.Columns.Contains("BranchName"))
ReportSourceTable.Columns.Add("BranchName");
//.........这里部分代码省略.........
示例7: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
try
{
string s ="";
if (dtpFromDate.Value.Date == dtpToDate.Value.Date)
{
s = string.Format(" Ngày {0} tháng {1} năm {2}",dtCreatePrint.Value.Day,dtCreatePrint.Value.Month,dtCreatePrint.Value.Year);
}
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")));
}
string tieude = "", reportname = "";
string sTitleReport;
var crpt = new ReportDocument();
if (chkTongBNHoanTatXN.Checked)
{
crpt = Utility.GetReport("crpt_BaoCaoSoLuongBN_TestType", ref tieude, ref reportname);
}
else
{
crpt = Utility.GetReport("crpt_BaoCaoSoLuongBN_TestType", ref tieude, ref reportname);
}
var oForm = new frmPrintPreview("Báo cáo thống kê số lượng bệnh nhân", crpt, true, dt.Rows.Count <= 0 ? false : true);
Utility.UpdateLogotoDatatable(ref dt);
crpt.SetDataSource(dt);
oForm.crptTrinhKyName = Path.GetFileName(reportname);
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);
}
}
示例8: cmdINPHIEU_Click
//.........这里部分代码省略.........
// Utility.ShowMsg("Không tồn tại dữ liệu");
// return;
//}
//bool forVd = SysPara.BarcodeType.ToUpper() == "VIETDUC";
////Xử lý các giá trị bình thường
//Utilities.ProcessNormalResult(ref dtRawResult, "Test_Result", "Normal_Level", "+",
// "+", "-", "flag", forVd);
//var patientResult = new StringBuilder();
//dtRawResult.Rows.InsertAt(dtRawResult.NewRow(), 0);
//dtRawResult.Rows[0]["Patient_ID"] = dtRawResult.Rows[1]["Patient_ID"];
//dtRawResult.Rows.Add(dtRawResult.NewRow());
//for (int i = 1; i <= dtRawResult.Rows.Count - 1; i++)
//{
// if (Utility.sDbnull(dtRawResult.Rows[i]["Patient_ID"]) !=
// Utility.sDbnull(dtRawResult.Rows[i - 1]["Patient_ID"]))
// {
// //patientResult.Remove(patientResult.Length - 2, 1);
// DataRow newdr = dt.NewRow();
// newdr["Patient_ID"] = dtRawResult.Rows[i - 1]["Patient_ID"];
// newdr["Barcode"] = dtRawResult.Rows[i - 1]["Barcode"];
// newdr["Patient_Name"] = dtRawResult.Rows[i - 1]["Patient_Name"];
// newdr["AGE"] = dtRawResult.Rows[i - 1]["AGE"];
// newdr["Sex"] = dtRawResult.Rows[i - 1]["Sex"];
// newdr["Department"] = dtRawResult.Rows[i - 1]["Department"];
// newdr["Diagnostic"] = dtRawResult.Rows[i - 1]["Diagnostic"];
// if (dtRawResult.Rows[i - 1]["Test_Date"] != null)
// newdr["Test_Date"] = ((DateTime) dtRawResult.Rows[i - 1]["Test_Date"]).ToString("dd/MM/yyyy");
// //newdr["Test_Date"] = DateTime.Parse(dtRawResult.Rows[i - 1]["Test_Date"].ToString()).ToString("dd/MM/yyyy");
// newdr["AllResult"] = patientResult.ToString();
// dt.Rows.Add(newdr);
// patientResult = new StringBuilder();
// }
// if ((Utility.sDbnull(dtRawResult.Rows[i]["TestType_Name"]) !=
// Utility.sDbnull(dtRawResult.Rows[i - 1]["TestType_Name"])) |
// (Utility.sDbnull(dtRawResult.Rows[i]["Patient_ID"]) !=
// Utility.sDbnull(dtRawResult.Rows[i - 1]["Patient_ID"])))
// {
// patientResult.Append("</p>");
// patientResult.Append(string.Format("</p><b>{0}</b>: ",
// Utility.sDbnull(dtRawResult.Rows[i]["TestType_Name"]).ToUpper
// ()));
// }
// string value;
// if (Utility.sDbnull(dtRawResult.Rows[i]["flag"]).Trim() == "+")
// value = string.Format("<font color=\"red\"><b>{0}({1}) {2};</b></font> ",
// Utility.sDbnull(dtRawResult.Rows[i]["Test_Name"]),
// Utility.sDbnull(dtRawResult.Rows[i]["flag"]),
// dtRawResult.Rows[i]["Test_result"]);
// else if (Utility.sDbnull(dtRawResult.Rows[i]["flag"]).Trim() == "-")
// value = string.Format("{0}({1}) {2}; ",
// Utility.sDbnull(dtRawResult.Rows[i]["Test_Name"]),
// Utility.sDbnull(dtRawResult.Rows[i]["flag"]),
// dtRawResult.Rows[i]["Test_result"]);
// else
// value = string.Format(
// Utility.sDbnull(dtRawResult.Rows[i]["Test_result"]).Trim() != ""
// ? "{0} {1};"
// : "<i>{0}      </i> ",
// Utility.sDbnull(dtRawResult.Rows[i]["Test_Name"]),
// dtRawResult.Rows[i]["Test_result"]);
// patientResult.Append(value);
//}
//dt.AcceptChanges();
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("sTenKhoa", sTenKhoa);
crpt.SetParameterValue("TongSoBenhNhan", dt.Rows.Count);
crpt.SetParameterValue("sFromDateToDate", s);
crpt.SetParameterValue("ParentBranchName", ManagementUnit.gv_sParentBranchName);
crpt.SetParameterValue("BranchName", ManagementUnit.gv_sBranchName);
//crpt.SetParameterValue("Address", ManagementUnit.gv_sAddress);
//crpt.SetParameterValue("sPhone", ManagementUnit.gv_sPhone);
crpt.SetParameterValue("sPrintDate", dtCreatePrint.Value.ToString("dd/MM/yyyy"));
oForm.crptViewer.ReportSource = crpt;
oForm.ShowDialog();
oForm.Dispose();
}
catch (Exception ex)
{
Utility.ShowMsg(ex.Message);
}
}
示例9: InphieuDv
private void InphieuDv()
{
foreach (GridEXRow GridEXRow in grdTestInfo.GetCheckedRows())
{
xmen += "," + Utility.sDbnull(GridEXRow.Cells["id_chidinh"].Value, -1);
}
idDichvu = xmen.Remove(0, 1);
int patient_id = Utility.Int32Dbnull(grdTestInfo.GetValue("id_benhnhan"));
// KcbChidinhcl objAssignInfo = KcbChidinhcl.FetchByID(v_AssignId);
DataTable dt = SPs.DLayThongTinBNChiDinhDV(idDichvu, patient_id).GetDataSet().Tables[0];
if (dt == null || dt.Rows.Count <= 0)
{
Utility.ShowMsg("Không có dữ liệu in. Mời bạn kiểm tra lại");
return;
}
//THU_VIEN_CHUNG.CreateXML(dt, "Thamkham_InphieuCLS.XML");
Utility.UpdateLogotoDatatable(ref dt);
//Utility.CreateBarcodeData(ref dt, v_AssignCode);
idDichvu = "";
string KhoGiay = "A5";
bool inchung = false;
string tieude = "", reportname = "";
MoneyByLetter _moneyByLetter = new MoneyByLetter();
var tinhtong = Utility.sDbnull(TinhTong(dt, KcbChidinhclsChitiet.DonGiaColumn.ColumnName));
var smstinh = dt.Compute("SUM(TT_PHUTHU)","");
string tongcong = Utility.sDbnull(TinhTong(dt, "tongcong"));
string thanhtien = Utility.sDbnull(TinhTong(dt, "thanhtien"));
// int tongcong = Utility.Int16Dbnull(tinhtong )+ Utility.Int16Dbnull(smstinh);
var crpt = Utility.GetReport("thanhtoan_Bienlai_Dichvu_A5", ref tieude, ref reportname);
var objForm = new frmPrintPreview("IN PHIẾU THANH TOAN", crpt, true, true);
try
{
//Utility.AddColumToDataTable(ref dt,"TinhTong",typeof(string));
// foreach (DataRow drRow in dt.Rows)
// {
// drRow["tinhtong"] = tinhtong;
// }
// dt.AcceptChanges();
crpt.SetDataSource(dt);
//crpt.DataDefinition.FormulaFields["Formula_1"].Text = Strings.Chr(34) + " Nhân viên Bác sĩ chỉ định ".Replace("#$X$#", Strings.Chr(34) + "&Chr(13)&" + Strings.Chr(34)) + Strings.Chr(34);
objForm.crptTrinhKyName = Path.GetFileName(reportname);
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, "CurrentDate", Utility.FormatDateTimeWithLocation(globalVariables.SysDate, globalVariables.gv_strDiadiem));
Utility.SetParameterValue(crpt, "sTitleReport", tieude);
Utility.SetParameterValue(crpt, "tinhtong", tinhtong);
Utility.SetParameterValue(crpt, "tongcong", tongcong);
Utility.SetParameterValue(crpt, "thanhtien", thanhtien);
Utility.SetParameterValue(crpt, "BottomCondition", THU_VIEN_CHUNG.BottomCondition());
Utility.SetParameterValue(crpt, "sMoneyCharacter", _moneyByLetter.sMoneyToLetter(Utility.sDbnull(tinhtong)));
objForm.crptViewer.ReportSource = crpt;
objForm.SetDefaultPrinter(PropertyLib._MayInProperties.TenMayInBienlai, 0);
objForm.ShowDialog();
objForm.Dispose();
// mayin = PropertyLib._MayInProperties.TenMayInBienlai;
//}
//else
//{
// objForm.addTrinhKy_OnFormLoad();
// crpt.PrintOptions.PrinterName = PropertyLib._MayInProperties.TenMayInBienlai;
// //mayin = PropertyLib._MayInProperties.TenMayInBienlai;
// crpt.PrintToPrinter(1, false, 0, 0);
//}
}
catch (Exception ex)
{
Utility.DefaultNow(this);
}
}
示例10: 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")));
}
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("sTenKhoa", sTenKhoa);
crpt.SetParameterValue("TongSoBenhNhan", dt.Rows.Count);
crpt.SetParameterValue("sFromDateToDate", s);
crpt.SetParameterValue("ParentBranchName", globalVariables.ParentBranch_Name);
crpt.SetParameterValue("BranchName", globalVariables.Branch_Name);
//crpt.SetParameterValue("Address", ManagementUnit.gv_sAddress);
//crpt.SetParameterValue("sPhone", ManagementUnit.gv_sPhone);
crpt.SetParameterValue("sPrintDate", dtCreatePrint.Value.ToString("dd/MM/yyyy"));
oForm.crptViewer.ReportSource = crpt;
oForm.ShowDialog();
oForm.Dispose();
}
catch (Exception ex)
{
Utility.ShowMsg(ex.Message);
}
}