Пример #1
0
        /// <summary>
        /// TRN07_1報表(匯出鈕)
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param>
        /// <param name="EOT">匯出Excel方式</param>           
        /// <returns>回傳查詢結果</returns>
        public DataTable TRN07_1(ArrayList ParameterList,
                                 string ReportOutputFormat,
                                 ref ReportList.ExcelOtherType EOT
                                 )
        {

            TRNModel.PrintTransAndDriver BCO = new PIC.VDS2G.LGT.TRN.PrintTransAndDriver(ConntionDB);

            DataTable Dt = BCO.PrintTrans(ParameterList);

            if (Dt.Rows.Count == 0)
            {
                throw new Exception("查無資料");
            }

            EOT = ReportList.ExcelOtherType.None;

            return Dt;
        }
Пример #2
0
    /// <summary>
    /// 抓取資料
    /// </summary>
    public DataTable queryData()
    {
        BCO.PrintTransAndDriver bco = new BCO.PrintTransAndDriver(ConntionDB);

        DataTable Dt = null;

        ParameterList.Clear();

        ParameterList.Add(SLP_SLPDate.Text.Trim());
        ParameterList.Add(SLP_Trans_No_S.Text.Trim());
        ParameterList.Add(SLP_Trans_No_E.Text.Trim());
        ParameterList.Add(SLP_Trans_Vendor_S.Text.Trim());
        ParameterList.Add(SLP_Trans_Vendor_E.Text.Trim());
        ParameterList.Add(SLP_Route_S.Text.Trim());
        ParameterList.Add(SLP_Route_E.Text.Trim());
        ParameterList.Add(SLP_StoreChain_S.Text.Trim());
        ParameterList.Add(SLP_StoreChain_E.Text.Trim());

        switch (rblPrintType.SelectedValue)
        {
            case "1":
                Dt = bco.PrintTrans(ParameterList);
                break;

            case "2":
                Dt = bco.PrintDriver(ParameterList);
                break;

            default:

                break;
        }

        return Dt;
    }