Пример #1
0
        /// <summary>
        /// hàm thực hiện việc in phiếu thu của y học hải quân
        /// </summary>
        /// <param name="sTitleReport"></param>
        private void YHHQ_PrintPhieuThu(string sTitleReport)
        {
            var crpt = new ReportDocument();

            Utility.WaitNow(this);

            crpt = new crpt_PhieuThu();

            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);
            crpt.SetParameterValue("ParentBranchName", globalVariables.ParentBranch_Name);
            crpt.SetParameterValue("BranchName", globalVariables.Branch_Name);
            crpt.SetParameterValue("DateTime", Utility.FormatDateTime(dtCreateDate.Value));
            crpt.SetParameterValue("CurrentDate", Utility.FormatDateTime(globalVariables.SysDate));
            crpt.SetParameterValue("sTitleReport", sTitleReport);
            crpt.SetParameterValue("CharacterMoney", sMoneyByLetter.sMoneyToLetter(txtSO_TIEN.Text));
            DataRow dataRow = m_dtReportPhieuThu.Rows[0];

            //if (status != 0)
            //crpt.SetParameterValue("NguoiChi", BusinessHelper.GetStaffByUserName(dataRow["NGUOI_NOP"].ToString()));
            objForm.crptViewer.ReportSource = crpt;
            objForm.ShowDialog();
            Utility.DefaultNow(this);
            //}
            //catch (Exception ex)
            //{
            //    Utility.DefaultNow(this);
            //}
        }
Пример #2
0
        /// <summary>
        /// hàm thực hiện việc in phieus thu của dệt may
        /// </summary>
        /// <param name="sTitleReport"></param>
        private void DM_PrintPhieuThu(string sTitleReport)
        {
            Utility.WaitNow(this);
            var crpt    = new crpt_PhieuThu();
            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);
            crpt.SetParameterValue("ParentBranchName", globalVariables.ParentBranch_Name);
            crpt.SetParameterValue("BranchName", globalVariables.Branch_Name);
            crpt.SetParameterValue("DateTime", Utility.FormatDateTime(dtCreateDate.Value));
            crpt.SetParameterValue("CurrentDate", Utility.FormatDateTime(globalVariables.SysDate));
            crpt.SetParameterValue("sTitleReport", sTitleReport);
            crpt.SetParameterValue("CharacterMoney", sMoneyByLetter.sMoneyToLetter(txtSO_TIEN.Text));
            objForm.crptViewer.ReportSource = crpt;
            objForm.ShowDialog();
            Utility.DefaultNow(this);
            //}
            //catch (Exception ex)
            //{
            //    Utility.DefaultNow(this);
            //}
        }
Пример #3
0
 /// <summary>
 /// hàm thực hiện việc in phiếu thu của y học hải quân
 /// </summary>
 /// <param name="sTitleReport"></param>
 private void YHHQ_PrintPhieuThu(string sTitleReport)
 {
     var crpt = new ReportDocument();
     Utility.WaitNow(this);
     if(status ==0)
      crpt = new crpt_PhieuThu();
     else
     {
         crpt = new crpt_PhieuChi();
         sTitleReport = "PHIẾU CHI";
     }
     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);
     crpt.SetParameterValue("ParentBranchName", globalVariables.ParentBranch_Name);
     crpt.SetParameterValue("BranchName", globalVariables.Branch_Name);
     crpt.SetParameterValue("DateTime", Utility.FormatDateTime(dtCreateDate.Value));
     crpt.SetParameterValue("CurrentDate", Utility.FormatDateTime(dtNgayIn.Value));
     crpt.SetParameterValue("sTitleReport", sTitleReport);
     crpt.SetParameterValue("CharacterMoney", sMoneyByLetter.sMoneyToLetter(txtSO_TIEN.Text));
     DataRow dataRow = m_dtReportPhieuThu.Rows[0];
     //if (status != 0)
     //crpt.SetParameterValue("NguoiChi", THU_VIEN_CHUNG.GetStaffByUserName(dataRow["NGUOI_NOP"].ToString()));
     objForm.crptViewer.ReportSource = crpt;
     objForm.ShowDialog();
     Utility.DefaultNow(this);
     //}
     //catch (Exception ex)
     //{
     //    Utility.DefaultNow(this);
     //}
 }
Пример #4
0
 /// <summary>
 /// hàm thực hiện việc in phieus thu của dệt may
 /// </summary>
 /// <param name="sTitleReport"></param>
 private void DM_PrintPhieuThu(string sTitleReport)
 {
     Utility.WaitNow(this);
     var crpt = new crpt_PhieuThu();
     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);
     crpt.SetParameterValue("ParentBranchName", globalVariables.ParentBranch_Name);
     crpt.SetParameterValue("BranchName", globalVariables.Branch_Name);
     crpt.SetParameterValue("DateTime", Utility.FormatDateTime(dtCreateDate.Value));
     crpt.SetParameterValue("CurrentDate", Utility.FormatDateTime(globalVariables.SysDate));
     crpt.SetParameterValue("sTitleReport", sTitleReport);
     crpt.SetParameterValue("CharacterMoney", sMoneyByLetter.sMoneyToLetter(txtSO_TIEN.Text));
     objForm.crptViewer.ReportSource = crpt;
     objForm.ShowDialog();
     Utility.DefaultNow(this);
     //}
     //catch (Exception ex)
     //{
     //    Utility.DefaultNow(this);
     //}
 }