예제 #1
0
 private void print()
 {
     try
     {
         string payType = "";
         if ("01".Equals(Payment.propPayTempParam.PropType))
         {
             payType = "水费";
         }
         if ("02".Equals(Payment.propPayTempParam.PropType))
         {
             payType = "电费";
         }
         if ("03".Equals(Payment.propPayTempParam.PropType))
         {
             payType = "燃气费";
         }
         PrintParam printParam = new PrintParam();
         printParam.payType = "物业" + payType;
         printParam.account = Payment.propPayTempParam.AccountNo;
         printParam.cardNo  = Payment.propPayTempParam.CardNo;
         printParam.amout   = Payment.propPayTempParam.PropOrderInfo.msgrsp.realAmout;
         printParam.orderno = Payment.propPayTempParam.PropOrderInfo.msgrsp.orderNo;
         PrintBLL.print(printParam);
     }
     catch (Exception ex)
     {
         log.Write("error:FormPropStepTemp06_success:print:" + ex.Message);
     }
 }
 void print()
 {
     try {
         PrintParam printParam = new PrintParam();
         //交易类型
         if (Payment.mobilePayParam.IcParams == null)
         {
             //甘肃一卡通交易
             printParam.tradingType = "甘肃一卡通";
         }
         else
         {
             //银联交易
             printParam.tradingType = "银行卡";
         }
         printParam.payType = "移动";
         printParam.account = Payment.mobilePayParam.PhoneOn;
         printParam.cardNo  = Payment.mobilePayParam.CardNo;
         printParam.amout   = Payment.mobilePayParam.RechageAmount;
         printParam.orderno = Payment.mobilePayParam.OrderInfo.msgrsp.orderNo;
         printParam.resqn   = Payment.mobilePayParam.Resqn;
         PrintBLL.print(printParam);
     }catch (Exception ex)
     {
         log.Write("error:FormMobileStep06_success:print():" + ex.Message);
     }
 }
예제 #3
0
        /// <summary>
        /// 得到打印文件
        /// </summary>
        /// <param name="url"></param>
        /// <param name="type"></param>
        /// <param name="data"></param>
        private int getDoc(string url, string type, JObject data, string name, int num)
        {
            PrintDialog pd = new PrintDialog();
            PrintBLL    pl = new PrintBLL();

            pl.SetPrintProperty(pd);

            PrintBLL printbll = new PrintBLL();

            FlowDocument doc = printbll.LoadDocument(type, url, data);

            if (doc != null)
            {
                doc.PageHeight  = pd.PrintableAreaHeight;
                doc.PageWidth   = pd.PrintableAreaWidth;
                doc.PagePadding = new Thickness(50);
                doc.ColumnGap   = 0;
                doc.ColumnWidth = pd.PrintableAreaWidth;

                Dispatcher.BeginInvoke(new DoPrintMethod(DoPrint), DispatcherPriority.ApplicationIdle, pd, ((IDocumentPaginatorSource)doc).DocumentPaginator, name, num);
                return(0);
            }
            else
            {
                return(1);
            }
        }
예제 #4
0
 private void btnToExcel_Click(object sender, EventArgs e)
 {
     PrintBLL.Print(dgrd, Text);
     //DataGridViewKJ128 dgv = new DataGridViewKJ128();
     //dgv = dgrd;
     //ExcelExports.ExportDataGridViewToExcel(dgv);
 }
예제 #5
0
 void print()
 {
     try {
         PrintParam printParam = new PrintParam();
         printParam.payType = "联通";
         if (Payment.unicomPayParam.IcParams == null)
         {
             //万通交易
             printParam.tradingType = "万通";
         }
         else
         {
             printParam.tradingType = "银行卡";
         }
         printParam.account = Payment.unicomPayParam.PhoneOn;
         printParam.cardNo  = Payment.unicomPayParam.CardNo;
         printParam.amout   = Payment.unicomPayParam.RechageAmount;
         printParam.orderno = Payment.unicomPayParam.Orderinfo.msgrsp.orderNo;
         printParam.resqn   = Payment.unicomPayParam.Resqn;
         PrintBLL.print(printParam);
     }catch (Exception ex)
     {
         log.Write("error:FormUnicomStep06_success:print():" + ex.Message);
     }
 }
예제 #6
0
 private void cpStationToExcel_Click(object sender, EventArgs e)
 {
     try
     {
         PrintBLL.Print(dgvMain, this.Text, bcpPageSum.CaptionTitle);
     }
     catch
     {
         MessageBox.Show("打印失败,请重新打印", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
예제 #7
0
 private void cpStaHeadToExcel_Click(object sender, EventArgs e)
 {
     if (dgvStaHead.DataSource != null)
     {
         PrintBLL.Print(dgvStaHead, "读卡分站信息");
     }
     else
     {
         MessageBox.Show("无数据信息,不能打印", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
 private void cpStationToExcel_Click(object sender, EventArgs e)
 {
     if (dgValue.DataSource != null)
     {
         PrintBLL.Print(dgValue, Text);
     }
     else
     {
         MessageBox.Show("查询无数据", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
예제 #9
0
 private void bcpExcel_Click(object sender, EventArgs e)
 {
     try
     {
         PrintBLL.Print(this.dgvMain, "历史行走异常报警信息");
     }
     catch
     {
         MessageBox.Show("打印失败,请重新打印", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
예제 #10
0
 private void cpToExcel_Click(object sender, EventArgs e)
 {
     PrintBLL.Print(dgValue, Text);
     //DataGridViewKJ128 dgv = new DataGridViewKJ128();
     //dgv = dgValue;
     ////if (dgv.Columns.Count > 6)
     ////{
     ////    dgv.Columns.Remove(dgv.Columns[6]);
     ////}
     //ExcelExports.ExportDataGridViewToExcel(dgv);
 }
예제 #11
0
        private void user_token_get()
        {
            string paras   = Request.Form["paras"];   //获取查询参数
            string user_id = Request.Form["user_id"]; //获取用户
            string app_id  = Request.Form["app_id"];  //获取合作ID

            //ExceptionReporter.WriteLog("app_id:" + app_id, ExceptionPostion.TBApply_Data, ExceptionRank.important);
            if (!string.IsNullOrEmpty(app_id) && app_id.Equals("8"))//检测用户
            {
                try
                {
                    //ExceptionReporter.WriteLog("paras:" + paras, ExceptionPostion.TBApply_Data, ExceptionRank.important);
                    string where = Base64.DecodeBase64(HttpUtility.UrlDecode(paras));
                    //ExceptionReporter.WriteLog("where:" + where, ExceptionPostion.TBApply_Data, ExceptionRank.important);
                    IDictionary <string, string> whereVales = TBPrint.GetParas(where);
                    if (whereVales != null && whereVales.Count > 0)
                    {
                        try
                        {
                            string userId     = whereVales["code"];
                            string nick_name  = "";
                            string expires_in = "";
                            string token      = "";
                            string freshToken = "";
                            //ExceptionReporter.WriteLog("userId:" + userId, ExceptionPostion.TBApply_Data, ExceptionRank.important);
                            DataTable tbSeller = PrintBLL.GetSellerNickById(userId);
                            if (tbSeller != null && tbSeller.Rows.Count > 0)
                            {
                                nick_name  = tbSeller.Rows[0]["NICK"].ToString();
                                expires_in = tbSeller.Rows[0]["endDate"].ToString();
                                token      = tbSeller.Rows[0]["SESSKEY"].ToString();
                                freshToken = tbSeller.Rows[0]["Refresh_Token"].ToString();
                            }
                            string userInfo = "{\"users\":{\"user\":{\"token\":\"" + token + "\",\"token_refresh\":\"" + freshToken + "\",\"user_id\":\"" + userId + "\",\"nick_name\":\"" + UTF8String.ValueOf(nick_name).getContent() + "\",\"expires_in\":\"" + expires_in + "\"}}}";
                            ExceptionReporter.WriteLog(userInfo, ExceptionPostion.TBApply_Data, ExceptionRank.important);
                            Response.Write(userInfo);
                        }
                        catch (Exception ex)
                        {
                            ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                        }
                    }
                    else
                    {
                        Response.Write("");
                    }
                }
                catch (Exception ex)
                {
                    ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
                }
            }
        }
        private void cpToExcel_Click(object sender, EventArgs e)
        {
            DataGridViewKJ128 dgv = new DataGridViewKJ128();

            if (rbEmp.Checked)
            {
                dgv = dvEmp;
            }
            else
            {
                dgv = dvEqu;
            }
            PrintBLL.Print(dgv, Text, lb_Counts.Text);
        }
 private void print()
 {
     try
     {
         PrintParam printParam = new PrintParam();
         printParam.payType = "物业";
         printParam.account = Payment.PropPayParam.Mobile;
         printParam.cardNo  = Payment.PropPayParam.CardNo;
         printParam.amout   = Payment.PropPayParam.PropOrderInfo.msgrsp.realAmout;
         printParam.orderno = Payment.PropPayParam.PropOrderInfo.msgrsp.orderNo;
         PrintBLL.print(printParam);
     }catch (Exception ex)
     {
         log.Write("error:FormPropStep06_success:print:" + ex.Message);
     }
 }
 void print()
 {
     try {
         PrintParam printParam = new PrintParam();
         printParam.payType = "电力";
         printParam.account = Payment.elecPayParam.Account;
         printParam.cardNo  = Payment.elecPayParam.CardNo;
         printParam.amout   = Payment.elecPayParam.OrderInfo.msgrsp.realAmout;
         printParam.orderno = Payment.elecPayParam.OrderInfo.msgrsp.orderNo;
         printParam.resqn   = Payment.elecPayParam.OrderInfo.msghead.reqsn;
         PrintBLL.print(printParam);
     }catch (Exception ex)
     {
         log.Write("error:电力打印异常:" + ex.Message);
     }
 }
예제 #15
0
 private void print()
 {
     try
     {
         PrintParam printParam = new PrintParam();
         printParam.payType = "公交";
         printParam.account = Payment.BusPayParam.BusNo;
         printParam.cardNo  = Payment.BusPayParam.CardNo;
         printParam.amout   = Payment.BusPayParam.UserInputMoney + ".00";
         printParam.orderno = Payment.BusPayParam.BusCpuCardInfo.msgrsp.orderno;
         printParam.resqn   = Payment.BusPayParam.BusCpuCardInfo.msghead.reqsn;
         PrintBLL.print(printParam);
     }catch (Exception ex)
     {
         log.Write("error:FormBusStep08_success:print():" + ex.Message);
     }
 }
        void print()
        {
            try {
                WantongBLL wt = new WantongBLL();
                //万通卡号
                string wtCard = wt.GetCardNo();

                PrintParam printParam = new PrintParam();
                printParam.payType = "燃气";
                printParam.account = Payment.GasPayParam.GasCard.CardNo;
                printParam.amout   = Payment.GasPayParam.GasCard.price;
                printParam.cardNo  = Payment.GasPayParam.CardNo;
                printParam.orderno = Payment.GasPayParam.GasOrderInfo.msgrsp.orderNo;
                //printParam.resqn = orderInfo.msghead.resqn;
                PrintBLL.print(printParam);
            }catch (Exception ex)
            {
                log.Write("error:FormGasGoldenCardStep8_success:print():" + ex.Message);
            }
        }
        private void print()
        {
            try
            {
                WantongBLL wt = new WantongBLL();

                PrintParam printParam = new PrintParam();
                printParam.payType = "广电";
                printParam.account = list.CUSTNO;
                printParam.cardNo  = Payment.broadCasPayParam.CardNo;
                printParam.amout   = orderInfo.msgrsp.realAmout;
                printParam.orderno = orderInfo.msgrsp.orderNo;
                printParam.resqn   = orderInfo.msghead.reqsn;
                PrintBLL.print(printParam);
            }
            catch (Exception ex)
            {
                log.Write("error:FormBroadCasStep06_success:print():" + ex.Message);
            }
        }
        private void print()
        {
            try
            {
                WantongBLL wt = new WantongBLL();
                //万通卡号
                string wtCard = wt.GetCardNo();

                PrintParam printParam = new PrintParam();
                printParam.payType = "热力";
                printParam.account = Payment.heatPayParam.HeatQueryOrderlist.custNo;
                printParam.cardNo  = Payment.heatPayParam.CardNo;
                printParam.amout   = Payment.heatPayParam.HeatOrderInfo.msgrsp.realAmout;
                printParam.orderno = Payment.heatPayParam.HeatOrderInfo.msgrsp.orderNo;
                printParam.resqn   = Payment.heatPayParam.HeatOrderInfo.msghead.resqn;
                PrintBLL.print(printParam);
            }catch (Exception ex)
            {
                log.Write("error:FormHeatStep06_success:print():" + ex.Message + ex.InnerException);
            }
        }
 private void print()
 {
     try
     {
         StringBuilder outMsg = new StringBuilder();
         Print.TT_OpenDevice(new StringBuilder("COM" + SysConfigHelper.readerNode("PrintPort")), new StringBuilder("38400"), outMsg);
         Print.TT_GetDeviceStatus(outMsg);
         // Print.TT_PrintText(new StringBuilder("三维终端 快捷支付 便利生活\n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder("  三维终端交易凭条\n"), outMsg);
         Print.TT_PrintText(new StringBuilder("----------------------"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder("交易类型:甘肃一卡通充值\n"), outMsg);
         Print.TT_PrintText(new StringBuilder("一卡通卡号:" + PrintBLL.hideCardNo(Payment.wintopReChargeParam.WtCardNo) + "****" + "\n"), outMsg);
         Print.TT_PrintText(new StringBuilder("银行卡号:" + PrintBLL.hideCardNo(Payment.wintopReChargeParam.IcParams["cardNo"]) + "\n"), outMsg);
         Print.TT_PrintText(new StringBuilder("交易时间:" + SysBLL.getTimeFormat() + "\n"), outMsg);
         Print.TT_PrintText(new StringBuilder("交易金额:¥" + Payment.wintopReChargeParam.WintopDiscountInfoMsgrspList.CZ00030 + "\n"), outMsg);
         Print.TT_PrintText(new StringBuilder("订单编号:" + Payment.wintopReChargeParam.WintopOrderInfo.msgrsp.orderNo + "\n"), outMsg);
         //Print.TT_PrintText(new StringBuilder("流水号:" + orderInfo.msghead.resqn + "\n"), outMsg);
         Print.TT_PrintText(new StringBuilder("备注:\n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder("-----持卡人存根-----\n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_PrintText(new StringBuilder(" \n"), outMsg);
         Print.TT_CutPaper(1, outMsg);
         Print.TT_CloseDevice(outMsg);
     }catch (Exception ex)
     {
         log.Write("error:FormCitizenStep08_success:print():" + ex.Message + ex.InnerException);
     }
 }
예제 #20
0
        private void print()
        {
            try
            {
                WantongBLL wt = new WantongBLL();
                //万通卡号
                string wtCard = wt.GetCardNo();

                PrintParam printParam = new PrintParam();
                printParam.payType = "水务";
                printParam.account = Payment.waterPayParam.OrderInfo.msgrsp.paymentNo;
                printParam.cardNo  = Payment.waterPayParam.CardNo;
                printParam.amout   = Payment.waterPayParam.OrderInfo.msgrsp.realAmout;
                printParam.orderno = Payment.waterPayParam.OrderInfo.msgrsp.orderNo;
                printParam.resqn   = Payment.waterPayParam.OrderInfo.msghead.reqsn;
                PrintBLL.print(printParam);
            }
            catch (Exception ex)
            {
                log.Write("error:FormMobileStep06_successprint:" + ex.Message);
            }
        }
예제 #21
0
        private void cpToExcel_Click(object sender, EventArgs e)
        {
            DataGridViewKJ128 dgv = new DataGridViewKJ128();

            if (rbEmp.Checked)
            {
                dgv = dvEmp;
                //if (dgv.Columns.Count > 8)
                //{
                //    dgv.Columns.Remove(dgv.Columns[8]);
                //    dgv.Columns.Remove(dgv.Columns[8]);
                //}
            }
            else
            {
                dgv = dvEqu;
                //if (dgv.Columns.Count > 8)
                //{
                //    dgv.Columns.Remove(dgv.Columns[8]);
                //    dgv.Columns.Remove(dgv.Columns[8]);
                //}
            }
            PrintBLL.Print(dgv, Text);
        }
예제 #22
0
 private void cpStationToExcel_Click(object sender, EventArgs e)
 {
     PrintBLL.Print(dgvMain, this.Text, "共 " + strCounts + " 人次");
 }
 private void btnConfigModel_Click(object sender, EventArgs e)
 {
     PrintBLL.PrintSet(dgrd, "月下井统计", "统计时间:" + cmbYear.Text);
 }
예제 #24
0
 private void cpToExcel_Click(object sender, EventArgs e)
 {
     PrintBLL.Print(dgrd, Text, "共 " + btnRowsCount + " 条");
 }
 private void btnConfigModel_Click(object sender, EventArgs e)
 {
     PrintBLL.PrintSet(dgrd, "历史补单", "");
 }
 private void cpToExcel_Click(object sender, EventArgs e)
 {
     PrintBLL.Print(dgvRTInfo, Text);
 }
예제 #27
0
 private void btnConfigModel_Click(object sender, EventArgs e)
 {
     PrintBLL.PrintSet(dgvMain, "历史下井人员信息", "统计时间:" + dateTimePickerBegin.Value.ToString("yyyy-MM-dd HH:mm:ss") + "--" + dateTimePickerEnd.Value.ToString("yyyy-MM-dd HH:mm:ss"));
 }
예제 #28
0
        /// <summary>
        ///
        /// </summary>
        private void GetInfo()
        {
            try
            {
                //根据源ID,获取对应数据信息
                string sql_TL_SYS_AUTO_PRINT_TASK           = @"SELECT TOP {0} [ID],[FID],[SHEET_FID],[PULL_MODEL],[PART_BOX_CODE],[PRINT_CONFIG_CODE],[PRINT_FILEPATH],[STATUS],[PRINT_TIME],[VALID_FLAG],
[SOURCE_ID],[CREATE_DATE],[CREATE_USER],[MODIFY_DATE],[MODIFY_USER] FROM [dbo].[TL_SYS_AUTO_PRINT_TASK]  WHERE [STATUS]=10 AND [SOURCE_ID]={1} ORDER BY [ID] ASC";
                List <AutoPrintTaskInfo> autoprinttaskinfos = new AutoPrintTaskBLL().GetList(String.Format(sql_TL_SYS_AUTO_PRINT_TASK, topSize, sourceId));
                if (autoprinttaskinfos.Count < 1)
                {
                    return;
                }
                ///获取基本配置信息
                string sql_TM_AUTO_PRINTER_CONFIG           = @"SELECT [ID] ,[FID],[VALID_FLAG],[CREATE_USER],[CREATE_DATE],[MODIFY_USER],[MODIFY_DATE]
      ,[COMMENTS],[PULL_MODEL],[PART_BOX_CODE],[PRINT_CONFIG_CODE],[PRINTER_NAME] ,[PRINTER_IPADDRESS],[IS_AUTO_PRINTER],[PAPER_SIZE],[PRINT_DIRECTION]
  FROM [dbo].[TM_AUTO_PRINTER_CONFIG]";
                List <PrinterConfigInfo> printerconfiginfos = new PrinterConfigBLL().GetList(sql_TM_AUTO_PRINTER_CONFIG);
                if (printerconfiginfos.Count < 1)
                {
                    return;
                }
                ///加载打印机配置信息
                string sql_TS_SYS_PRINT_CONFIG          = @"SELECT [ID],[FID],[PRINT_CONFIG_CODE],[PRINT_CONFIG_NAME],[PRINT_TEMPLATE_FILENAME],[PRINT_TEMPLATE_URL],[TEMPLATE_FILE_TYPE]
      ,[PRINT_COPIES],[PRINTER_NAME],[LAST_UPLOADFILE_TIME],[STATUS],[COMMENTS],[VALID_FLAG],[CREATE_USER],[CREATE_DATE],[MODIFY_USER],[MODIFY_DATE] FROM [dbo].[TS_SYS_PRINT_CONFIG]";
                List <PrintConfigInfo> printconfiginfos = new PrintConfigBLL().GetList(sql_TS_SYS_PRINT_CONFIG);

                ///循环匹配打印机设置
                foreach (var item in autoprinttaskinfos)
                {
                    string pullModel   = item.PullModel.GetValueOrDefault().ToString();
                    string partBoxCode = item.PartBoxCode;
                    if (string.IsNullOrEmpty(pullModel) || string.IsNullOrEmpty(partBoxCode))
                    {
                        continue;
                    }
                    //开始匹配,如果不为NULL,则表示匹配成功
                    var selectlist = printerconfiginfos.FirstOrDefault(a => a.PullModel == int.Parse(pullModel) && a.PartBoxCode == partBoxCode);
                    if (selectlist == null)
                    {
                        continue;
                    }
                    string printConfigCode = item["PRINT_CONFIG_CODE"].ToString();
                    //通过匹配到的PRINT_CONFIG_CODE 在printconfiginfos集合中匹配,如果匹配成功,则获取打印信息;
                    var listPathRout = printconfiginfos.FirstOrDefault(a => a.PrintConfigCode == printConfigCode && a.Status == 20);
                    if (listPathRout == null)
                    {
                        continue;
                    }
                    //Thread.Sleep(100);
                    string printTemplateFilename = listPathRout.PrintTemplateFilename; //获取模板名称
                    string printTemplateUrl      = listPathRout.PrintTemplateUrl;      //获取路径

                    ///根据打印配置代码①从打印配置TS_SYS_PRINT_CONFIG中获取对应的配置信息,如未能获取有效数据则提示<打印配置信息错误>,并记录系统日志
                    PrintConfigInfo info = new PrintConfigBLL().GetInfoByCode(printConfigCode);
                    if (info == null)
                    {
                        throw new Exception("MC:0x00000731");///打印配置信息错误
                    }
                    ///根据打印配置中的打印模板路径④及打印模板文件名称③获取服务端中的两个文件
                    ///一个为打印模板文件名称③,另一个为同名的xml字段匹配配置文件
                    string templateFileType = "html";
                    switch (info.TemplateFileType.GetValueOrDefault())
                    {
                    case (int)TemplateFileTypeConstants.xlsx: templateFileType = "xlsx"; break;

                    case (int)TemplateFileTypeConstants.xls: templateFileType = "xls"; break;

                    default: templateFileType = "html"; break;
                    }
                    ///根据打印文件路径名称在服务端获取相应的文件,如未能成功获取则提示<打印文件错误>,并记录系统日志TL_SYS_OPERATION_LOG
                    if (!info.PrintTemplateUrl.StartsWith("/"))
                    {
                        info.PrintTemplateUrl = "/" + info.PrintTemplateUrl;
                    }
                    string templateFileName = HttpContext.Current.Server.MapPath(info.PrintTemplateUrl) + "/" + info.PrintTemplateFilename + "." + templateFileType;
                    if (!File.Exists(templateFileName))
                    {
                        throw new Exception("MC:0x00000061");///打印模板文件不存在
                    }
                    string configFileName = HttpContext.Current.Server.MapPath(info.PrintTemplateUrl) + "/" + info.PrintTemplateFilename + ".xml";
                    if (!File.Exists(configFileName))
                    {
                        throw new Exception("MC:0x00000067");///打印配置文件不存在
                    }
                    ///
                    string tempPrintFilePathConfig = "/TEMP/PRINTFILES";
                    ///
                    string tempPrintFilePath = HttpContext.Current.Server.MapPath(tempPrintFilePathConfig);
                    ///文件夹是否存在
                    if (!Directory.Exists(tempPrintFilePath))
                    {
                        Directory.CreateDirectory(tempPrintFilePath);
                    }

                    List <string> listfiles = new PrintBLL().CreatePrintFiles(templateFileName, configFileName, templateFileType, GetPrintDataInfos("A", item["SHEET_FID"].ToString()), tempPrintFilePath, tempPrintFilePathConfig);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #29
0
 private void btnConfigModel_Click(object sender, EventArgs e)
 {
     PrintBLL.PrintSet(dgvMain, "请假管理", "");
 }
 private void cpToExcel_Click(object sender, EventArgs e)
 {
     PrintBLL.Print(dgValue, Text, lb_Counts.Text);
 }