Exemplo n.º 1
0
        /// <summary>
        /// CAM35報表
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable CAM35_1(ArrayList ParameterList)
        {
            #region 宣告變數

            BCO.CAMCommon CAMCommonBCO = new BCO.CAMCommon();
            ArrayList arl_ReportService = new ArrayList();
            DataTable dt_Return = new DataTable();

            #endregion

            #region 傳入參數

            arl_ReportService.Clear();

            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[0].ToString(), "date", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[1].ToString(), "date", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[2].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[3].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[4].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[5].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[6].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[7].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[8].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[9].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[10].ToString(), "int", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[11].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[12].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[13].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[14].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[15].ToString(), "string", false));
            arl_ReportService.Add(CAMCommonBCO.GetValueSetParameter(ParameterList[16].ToString(), "int", false));

            #endregion

            #region 連結資料庫

            BCO.CAM35_BCO bco = new BCO.CAM35_BCO(ConntionDB);
            dt_Return = bco.QueryStoreTransfer(arl_ReportService);

            #endregion

            #region 檢查回傳資料

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

            #endregion
        }
Exemplo n.º 2
0
    private void BindData()
    {
        string SessionIDName = "CAM351_" + PageTimeStamp.Value;
        CAM35_BCO bco = new CAM35_BCO(ConntionDB);
        CAMCommon CAMCommonBCO = new CAMCommon();

        ArrayList ParameterList = new ArrayList();
        ParameterList.Clear();
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_SIGN_DATE.StartDate, "date", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_SIGN_DATE.EndDate, "date", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.rblTransferStatus.SelectedValue, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_GROUP_NO_S.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_GROUP_NO_E.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_STORE.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_Z_O_S.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_Z_O_E.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_AC_UID.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_ROOT_NO.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_TAX_TYPE.Text, "int", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_ITEM_S.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_ITEM_E.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_PERIOD_S.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(this.SLP_PERIOD_E.Text, "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter(Session["UID"].ToString(), "string", false));
        ParameterList.Add(CAMCommonBCO.GetValueSetParameter((TextBoxRowCountLimit.Text == "") ? "20" : (int.Parse(TextBoxRowCountLimit.Text) < 0) ? "20" : TextBoxRowCountLimit.Text, "int", false));

        DataTable dt = bco.QueryStoreTransfer(ParameterList);

        Session[SessionIDName] = dt;
        GridView1.DataSource = dt;
        GridView1.PageSize = (TextBoxPagesize.Text == "") ? 20 : (int.Parse(TextBoxPagesize.Text) < 0) ? 20 : int.Parse(TextBoxPagesize.Text);
        GridView1.PageIndex = 0;
        GridView1.DataBind();

        if (dt.Rows.Count == 0)
        {
            ErrorMsgLabel.Text = "查無資料";
        }
    }