Ejemplo n.º 1
0
        /// <summary>
        /// 绑定查询列表数据
        /// </summary>
        private void BindData()
        {
            Hashtable ht       = new Hashtable();
            PageUtil  pageUtil = new PageUtil(GridAcconding.PageIndex, GridAcconding.PageSize);

            ht.Add("DateStart", Dp_BeginDate.Text == "" ? null : Dp_BeginDate.Text);
            ht.Add("DateEnd", Dp_EndDate.Text == "" ? null : Dp_EndDate.SelectedDate.Value.AddDays(1).ToString("yyyy-MM-dd"));
            if (dropDictLab.SelectedValue == "-1")
            {
                ht.Add("labid", Userinfo.joinLabidstr);
            }
            else
            {
                ht.Add("labid", dropDictLab.SelectedValue);
            }
            ht.Add("province", dropProvice.SelectedValue);
            ht.Add("pageStart", pageUtil.GetPageStartNum());
            ht.Add("pageEnd", pageUtil.GetPageEndNum());
            ht.Add("Section", txtSection.Text.Trim());
            if (DropCustomer.SelectedValue != "-1")
            {
                ht.Add("customername", DropCustomer.SelectedValue);
            }
            IDictionary <string, object> dic = GetDate(ddlStatus.SelectedValue, ht);

            GridAcconding.RecordCount = Convert.ToInt32(dic["RecordCount"].ToString());
            GridAcconding.DataSource  = (DataTable)dic["DataSource"];
            GridAcconding.DataBind();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 绑定查询数据列表
        /// </summary>
        private void BindData()
        {
            PageUtil  pageUtil = new PageUtil(GridAcconding.PageIndex, GridAcconding.PageSize);
            Hashtable ht       = new Hashtable();

            ht.Add("accordingtype", DropAccordingType.SelectedValue);
            ht.Add("begindate", Dp_BeginDate.Text == "" ? null : Dp_BeginDate.Text);
            ht.Add("enddate", this.Dp_EndDate.Text == "" ? null : this.Dp_EndDate.SelectedDate.Value.AddDays(1).ToString("yyyy-MM-dd"));
            ht.Add("pageStart", pageUtil.GetPageStartNum());
            ht.Add("pageEnd", pageUtil.GetPageEndNum());

            GridAcconding.RecordCount = os.GetHPVTMAccondingInfosCount(ht);
            GridAcconding.DataSource  = os.GetHPVTMAccondingInfos(ht);
            GridAcconding.DataBind();
        }