コード例 #1
0
    private void QueryData()
    {
        #region
        try
        {
            string SessionIDName = string.Format("{0}_{1}", strPrefixed, PageTimeStamp.Value);
            ALOModel.QueryALOCommon BCO = new ALOModel.QueryALOCommon(ConnectionDB);

            if (s_DIS_NO.Substring(s_DIS_NO.Length - 1, 1) == ",")
            {
                s_DIS_NO = s_DIS_NO.Substring(0, s_DIS_NO.Length - 1);
            }

            ArrayList ParameterList = new ArrayList();//20091113

            ParameterList.Clear();
            ParameterList.Add(s_DIS_NO);
            ParameterList.Add(s_OP_TYPE == "" ? "1" : s_OP_TYPE);
            ParameterList.Add(Session["UID"].ToString());

            DataTable dt = BCO.QueryApproveErrorData(ParameterList);
            if (dt != null && dt.Rows.Count > 0)
            {
                this.btn_Save.Enabled = true;
                this.gv_Result.DataSource = dt;
                this.gv_Result.PageSize = 10;
                this.gv_Result.PageIndex = 0;
                this.gv_Result.DataBind();
                Session[SessionIDName] = dt;
            }
            else
            {
                ResultMsgLabel.Text = "查無資料";
            }
        }
        catch (Exception ex)
        {
            ErrorMsgLabel.Text = ex.Message;
        }

        #endregion
    }