Beispiel #1
0
    /// <summary>
    /// databind 繫結查詢資料到GridView1
    /// </summary>
    private void databind()
    {
        //抓取本頁初次登記的時間

        string SessionIDName = "CGD061_" + PageTimeStamp.Value;

        CGDModel.ProcessDeliverTransDPS BCO = new CGDModel.ProcessDeliverTransDPS(ConntionDB);

        DataTable Dt;
        ParameterList.Clear();
        ParameterList.Add(this.slp_ST_ACCEPT_DATE.StartDate);
        ParameterList.Add(this.slp_ST_ACCEPT_DATE.EndDate.ToString());
        ParameterList.Add(this.txtPickNo.Text);

        Dt = BCO.QueryDeilyDPSitem(ParameterList);

        if (Dt.Rows.Count == 0)
        {
            ErrorMsgLabel.Text = "查無資料";
            //ScriptManager.RegisterStartupScript(Page, this.GetType(), "CGD061.aspx", "alert(' 查無資料 ');", true);
        }


        //#region 使用XML放置到前端資料


        //MasterOLDData.InnerHtml = Dt.DataSet.GetXml();

        //#endregion

        Session[SessionIDName] = Dt;
        GridView1.DataSource = Dt;
        //設定分頁大小
        GridView1.PageIndex = 0;
        GridView1.DataBind();
    }
Beispiel #2
0
    private void GetCGD061Data(string strDate, string endDate, string pickNo)
    {
        string SessionIDName = "CGD062_01_" + Request.QueryString["SessionTimeStamp"];

        CGDModel.ProcessDeliverTransDPS BCO = new CGDModel.ProcessDeliverTransDPS(ConntionDB);

        DataTable Dt;
        ParameterList.Clear();
        ParameterList.Add(strDate);
        ParameterList.Add(endDate);
        ParameterList.Add(pickNo);

        Dt = BCO.QueryDeilyDPSitem(ParameterList);

        Session[SessionIDName] = Dt;
    }