public DataTable searchData()
    {
        #region 清空靜態變數
        dt_Detail = null;
        #endregion

        #region 處理查詢

        this.txt_SKU.Text = Request.QueryString["SKU"];
        this.txt_SKU_Name.Text = Request.QueryString["SKU_Name"];
        this.txt_ItemPeriod.Text = Request.QueryString["ItemPeriod"];
        this.txt_User.Text = Request.QueryString["User"];
        this.txt_User_Name.Text = Request.QueryString["txt_User_Name"];
        this.txt_Issuance_Date.Text = Request.QueryString["Issuance_Date"];
        this.txt_Period_End_Date.Text = Request.QueryString["Period_End_Date"];
        this.txt_ROW_NO.Value = Request.QueryString["ROW_NO"];
        this.txt_searchType.Value = Request.QueryString["searchType"];

        ParameterList.Clear();
        ParameterList.Add(GetValueSetParameter(this.txt_SKU.Text, "string"));//[品號]
        ParameterList.Add(GetValueSetParameter(this.txt_ItemPeriod.Text, "string"));//[期別]
        ParameterList.Add(GetValueSetParameter(this.txt_Issuance_Date.Text, "string"));
        ParameterList.Add(GetValueSetParameter(this.txt_Period_End_Date.Text, "string"));
        ParameterList.Add(GetValueSetParameter(this.txt_User.Text, "string"));
        ParameterList.Add(GetValueSetParameter(this.txt_ROW_NO.Value, "string"));
        ParameterList.Add(GetValueSetParameter(this.TextBoxRowCountLimit.Text, "int"));//筆數
        ParameterList.Add(txt_BUS_DATE_S.Text); //進貨日期起
        ParameterList.Add(txt_BUS_DATE_E.Text); //進貨日期迄

        BCO.QueryQtySum bco = new QueryQtySum(ConntionDB);
        DataTable Dt = null;

        if (this.txt_searchType.Value == "1")
        {
            Dt = bco.QueryTotalSaleStoreByChanNo(ParameterList);
        }
        else if (this.txt_searchType.Value == "2")
        {
            Dt = bco.QueryTotalSaleStoreByZO(ParameterList);
        }
        else if (this.txt_searchType.Value == "3")
        {
            Dt = bco.QueryTotalSaleStoreByAreaCode(ParameterList);
        }
       
        #endregion
        return Dt;
예제 #2
0
        /// <summary>
        /// COM03已銷點報表
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable COM03_3(ArrayList ParameterList,
                                 string ReportOutputFormat,
                                 ref ReportList.ExcelOtherType EOT
                                 )
        {
            COMModel.QueryQtySum bco = new COMModel.QueryQtySum(ConntionDB);
            DataTable Dt = new DataTable();
            switch (ParameterList[9].ToString())
            {
                case "1":
                    Dt = bco.QueryTotalSaleStoreByChanNo(ParameterList);
                    break;
                case "2":
                    Dt = bco.QueryTotalSaleStoreByZO(ParameterList);
                    break;
                case "3":
                    Dt = bco.QueryTotalSaleStoreByAreaCode(ParameterList);
                    break;
            }

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