示例#1
0
        /// <summary>
        /// 產生CGD18第一張報表_門市進貨單
        /// </summary>
        /// <param name="ParameterList">查詢DB的參數</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable GGD18_1(ArrayList ParameterList)
        {
            CGDModel.ProcessStoreReport BCO = new CGDModel.ProcessStoreReport(ConntionDB);

            DataTable Dt = BCO.ProcessStoreData(ParameterList);

            return Dt;
        }
示例#2
0
    /// <summary>
    /// 未列印門市檢查
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnUnpringCheck_Click(object sender, EventArgs e)
    {

        try
        {
            ErrorMsgLabel.Text = "";
            this.hid_PageStatus.Value = "PRINT";

            CGDModel.ProcessStoreReport BCO = new PIC.VDS2G.LGT.CGD.ProcessStoreReport(ConntionDB);

            DataTable Dt;
            ParameterList.Clear();

            ParameterList.Add(slpStAcceptDate.Text.Trim());//1 門市進貨日

            Dt = BCO.CheckRouteStore(ParameterList);

            if (Dt.Rows.Count == 0)
            {
                this.hid_PageStatus.Value = "QUERY";
                this.CrystalReportViewer1.Visible = false;
                ErrorMsgLabel.Text = "查無資料";
                //ScriptManager.RegisterStartupScript(Page, this.GetType(), "CGD181.aspx", "alert(' 查無資料 ');", true);

                return;
            }
            else
            {
                #region 顯示報表

                string s_FileName = "";      //設定輸出檔名
                string s_rptFilePath = "";   //設定報表路徑

                s_rptFilePath = Server.MapPath("./REPORT/CGD181R02.rpt");
                s_FileName = HttpUtility.UrlEncode("未列印門市進貨單路線.PDF", System.Text.Encoding.UTF8);


                LoadCrystalReport(s_FileName, s_rptFilePath, Dt, "PDF", "2");

                #endregion

                //ShowUnprintReport(Dt);
            }

        }
        catch (Exception ex)
        {
            ErrorMsgLabel.Text = ex.Message;
        }
    }