Esempio n. 1
0
        /// <summary>
        /// COM03未銷點報表
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable COM03_2(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.QueryNonSaleStoreByChanNo(ParameterList);
                    break;
                case "2":
                    Dt = bco.QueryNonSaleStoreByZO(ParameterList);
                    break;
                case "3":
                    Dt = bco.QueryNonSaleStoreByAreaCode(ParameterList);
                    break;
                default:
                    break;
            }

            if (Dt.Rows.Count == 0)
            {
                throw new Exception("查無資料");
            }
            else
            {
                return Dt;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// COM03報表
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable COM03_1(ArrayList ParameterList,
                                 string ReportOutputFormat,
                                 ref ReportList.ExcelOtherType EOT
                                 )
        {
            COMModel.QueryQtySum bco = new COMModel.QueryQtySum(ConntionDB);
            DataTable Dt = new DataTable();
            switch (ParameterList[8].ToString())
            {
                case "1":
                    Dt = bco.QueryByChanNo(ParameterList);
                    break;
                case "2":
                    Dt = bco.QueryByZO(ParameterList);
                    break;
                case "3":
                    Dt = bco.QueryByAreaCode(ParameterList);
                    break;
            }

            if (Dt.Rows.Count == 0)
            {
                throw new Exception("查無資料");
            }
            else
            {
                DataRow[] dr = Dt.Select("ROW_NO='合計'");
                Dt.Rows.Remove(dr[0]);
                //DataTable dt = new DataView(Dt, "ROW_NO not in ('合計')", string.Empty, DataViewRowState.CurrentRows).ToTable();
                return Dt;
            }
        }
Esempio n. 3
0
    public DataTable searchData()
    {
        #region 前置檢查與參數過濾


        string txt_SLP_SKU = this.SLP_SKU.Text;

        string txt_SLP_ItemPeriod = this.SLP_ItemPeriod.Text;

        string txt_SLP_User = this.SLP_User.Text;

        string txt_SLP_Issuance_Date = this.SLP_Issuance_Date.Text;

        string txt_SLP_Period_End_Date = this.SLP_Period_End_Date.Text;

        #endregion

        #region 清空靜態變數
        dt_Detail = null;
        #endregion

        #region 處理查詢 1:通路,2:營業所,3:縣市別
        ParameterList.Clear();
        ParameterList.Add(GetValueSetParameter(txt_SLP_SKU, "string"));//[品號]
        ParameterList.Add(GetValueSetParameter(txt_SLP_ItemPeriod, "string"));//[期別]
        ParameterList.Add(GetValueSetParameter(txt_SLP_Issuance_Date, "string"));
        ParameterList.Add(GetValueSetParameter(txt_SLP_Period_End_Date, "string"));
        ParameterList.Add(GetValueSetParameter(txt_SLP_User, "string"));
        ParameterList.Add(GetValueSetParameter(this.TextBoxRowCountLimit.Text, "int"));//筆數
        ParameterList.Add(SLP_BUS_DATE.StartDate); //進貨日期起
        ParameterList.Add(SLP_BUS_DATE.EndDate); //進貨日期迄
        BCO.QueryQtySum bco = new QueryQtySum(ConntionDB);
        DataTable Dt = null;

        if (this.searchType.Value == "1") //1:通路,2:營業所,3:縣市別
        {
            Dt = bco.QueryByChanNo(ParameterList);
        }
        else if (this.searchType.Value == "2")
        {
            Dt = bco.QueryByZO(ParameterList);
        }
        else if (this.searchType.Value == "3")
        {
            Dt = bco.QueryByAreaCode(ParameterList);
        }

        #endregion
    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.QueryNonSaleStoreByChanNo(ParameterList);
        }
        else if (this.txt_searchType.Value == "2")
        {
            Dt = bco.QueryNonSaleStoreByZO(ParameterList);
        }
        else if (this.txt_searchType.Value == "3")
        {
            Dt = bco.QueryNonSaleStoreByAreaCode(ParameterList);
        }

        #endregion
        return Dt;