Пример #1
0
 public clsPrintSingleWorkLoad(System.Drawing.Printing.PrintPageEventArgs p_obj, clsSingleWorkLoad_VO VO)
 {
     objDraw       = p_obj;
     objFontTitle1 = new Font("SimSun", 12, FontStyle.Bold);
     objFontTitle2 = new Font("SimSun", 16, FontStyle.Bold);
     objFontNormal = new Font("SimSun", 10);
     obj_VO        = VO;
 }
Пример #2
0
        private void m_mthPrintSingleWorkLoad(System.Drawing.Printing.PrintPageEventArgs e, int flag)
        {
//			foreach(PaperSize ps in this.m_objViewer.printDocument1.PrinterSettings.PaperSizes)
//			{
//				if(ps.PaperName=="A4")
//				{
//					this.m_objViewer.printDocument1.DefaultPageSettings.PaperSize=ps;
//					break;
//				}
//			}
            if (this.m_objViewer.txtCode.Tag != null && this.m_objViewer.txtCode.Tag.ToString().Trim() != "")
            {
                #region 收集数据
                clsSingleWorkLoad_VO obj = new clsSingleWorkLoad_VO();
                obj.m_strHospitalName = this.m_objComInfo.m_strGetHospitalTitle();
                string strID = this.m_objViewer.txtCode.Tag.ToString();
                if (flag == 2)
                {
                    obj.m_strTitle     = "部门工作量统计报表";
                    obj.m_strOwnerName = "部门名称:" + this.m_objViewer.cmbDep.Text;
                    strID = this.m_objViewer.cmbDep.SelectItemValue;
                }
                else
                {
                    obj.m_strTitle     = "医生工作量统计报表";
                    obj.m_strOwnerName = "医生名称:" + this.m_objViewer.txtName.Text;
                }
                obj.m_strBeginDate = this.m_objViewer.dateTimePicker1.Value.ToString("yyyy年MM月dd日");
                obj.m_strEndDate   = this.m_objViewer.dateTimePicker2.Value.ToString("yyyy年MM月dd日");
                clsSingleWorkLoadSubItem_VO[] objSubArr = null;
                objSvc.m_mthGetSingleWorkLoad(strID, this.m_objViewer.dateTimePicker1.Value, this.m_objViewer.dateTimePicker2.Value, flag, out objSubArr);
                obj.objSubItmeArr = objSubArr;
                if (objSubArr != null)
                {
                    decimal decSumMoney = 0;
                    for (int i = 0; i < objSubArr.Length; i++)
                    {
                        decSumMoney += this.m_mthConvertObjToDecimal(objSubArr[i].m_strCatMoney);
                    }
                    obj.strSumMoney = decSumMoney.ToString();
                }
                else
                {
                    obj.strSumMoney = "0";
                }
                #endregion
                m_objSingleWorkVo = obj;
                clsPrintSingleWorkLoad objSinglePrint = new clsPrintSingleWorkLoad(e, obj);
                objSinglePrint.m_mthBegionPrint();
            }
            else
            {
                e.Cancel = true;
            }
        }