Exemple #1
0
        /// <summary>
        /// IVM29_1報表(庫存月結報表)
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataTable IVM29_1(ArrayList ParameterList,
                                   string ReportOutputFormat,
                                   ref ReportList.ExcelOtherType EOT
                                  )
        {
            #region
            IVMModel.VDS_IVM29_BCO bco = new IVMModel.VDS_IVM29_BCO(ConntionDB);
            DataTable Dt = new DataTable();
            Dt = bco.QUERY_IVM_CHECKOUT(ParameterList);

            if (Dt == null || Dt.Rows.Count == 0)
            {
                throw new Exception("查無資料");
            }
            else
            {
                return Dt;
            }
            #endregion
        }
Exemple #2
0
    private void QueryData()
    {
        #region
        try
        {
            #region
            string SessionIDName = string.Format("{0}_{1}", strPrefixed, PageTimeStamp.Value);

            DataTable dt = new DataTable();
            IVMModel.VDS_IVM29_BCO BCO = new IVMModel.VDS_IVM29_BCO(ConnectionDB);

            ArrayList ParameterList = new ArrayList();
            ParameterList.Clear();
            ParameterList.Add(SLP_YearMonth1.Text.Trim());
            dt = BCO.QUERY_IVM_CHECKOUT(ParameterList);

            Session[SessionIDName] = dt;

            GridView1.DataSource = dt;
            GridView1.PageIndex = 0;
            GridView1.DataBind();
            GridView1.SelectedIndex = -1;

            if (dt == null || (dt != null && dt.Rows.Count <= 0))
            {
                ErrorMsgLabel.Text = "查無資料";
                Panel_QueryResult.Visible = false;
            }
            else
            {
                Panel_QueryResult.Visible = true;
            }
            #endregion
        }
        catch (Exception ex)
        {
            ErrorMsgLabel.Text = ex.Message;
        }
        finally
        {
            UpdatePanel1.Update();
        }

        #endregion
    }