Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                dtContent.Rows[0].Cells[3].Visible = false;
                dtContent.Rows[1].Cells[3].Visible = false;
                dtContent.Rows[2].Cells[2].Visible = false;
                dtContent.Rows[3].Cells[2].Visible = false;

                //根据实际情况调用
                string jobID  = string.Empty;
                string listID = string.Empty;
                string area   = string.Empty;
                try
                {
                    jobID  = Request.QueryString["jobID"];
                    listID = Request.QueryString["listID"];
                    area   = Request.QueryString["area"];
                    DataAccess.RunProcedure run = new DataAccess.RunProcedure();
                    string    DbName            = run.GetListDbName(jobID);
                    DataTable dt = run.Receipt(listID, DbName).Tables[0];
                    LoadPage(dt, area);
                }
                catch
                {
                    Alert("获取打印页面失败!");
                }
            }
        }
 /// <summary>
 /// 生成工单编号
 /// </summary>
 /// <returns></returns>
 public static string GetCardNo()
 {
     lock ( Locker )               //lock 关键字可确保当一个线程位于代码的临界区时,另一个线程不会进入该临界区。
     {
         string       strCounterKey   = DateTime.Now.ToString("yyyyMMdd");
         RunProcedure runProcedure    = new RunProcedure();
         string       strCounterValue = runProcedure.GetAppCounter(strCounterKey);
         // Thread.Sleep(100);
         //返回工单号
         return(string.Format("{0}{1}", strCounterKey, strCounterValue.ToString().PadLeft(5, '0')));
     }
 }
 /// <summary>
 /// 发送短信DKQ
 /// </summary>
 /// <param name="jobID">工单号</param>
 public static void SendMessageDKQ(string jobID, string content)
 {
     try
     {
         if (bool.Parse(ZWL.GeneralHelper.GetSettingByKey("IsSend")))
         {
             DataTable dt = new RunProcedure().SMS_DKQ(jobID, content).Tables[0];
             if (dt.Rows.Count > 0)
             {
                 IRequestSend(dt);
             }
         }
     }
     catch
     {
         return;
     }
 }