예제 #1
0
    private void databind()
    {
        #region

        ErrorMsgLabel.Text = "";

        string TOTAL_DIS_QTY = "";

        string SessionIDName = string.Format("{0}", PAGE_DT_01);

        PURModel.MaintainPurchaseDeliveryGoods BCO = new PURModel.MaintainPurchaseDeliveryGoods(ConnectionDB);
        ParameterList.Clear();
        ParameterList.Add(this.SLP_ACCEPT_DATE.Text);
        ParameterList.Add(this.SLP_ITEM.Text);
        ParameterList.Add(this.SLP_PERIOD.Text);

        DataTable Dt = BCO.QueryAloItemNum(ParameterList, out TOTAL_DIS_QTY);  

        LabelQueryRecordCount.Text = "合計:" + TOTAL_DIS_QTY; 

        GridView1.DataSource = Dt;
        Session[SessionIDName] = Dt;
        GridView1.DataBind();

        if (Dt == null || (Dt != null && Dt.Rows.Count <= 0))
        {
            ErrorMsgLabel.Text = "查無資料";
            //ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "ClientScript", "alert('查無資料');", true);
        }
        #endregion
    }