Exemplo n.º 1
0
    void bindData()
    {
        f_SRM_Result model = new f_SRM_Result();

        model.WorkFlowStatus  = "2";//供应商确认中
        model.SRM_Contract_NO = txtNo.Text.Trim();

        int       total = 0;
        DataTable dt    = null;

        if (string.IsNullOrEmpty(model.SRM_Contract_NO))//一般查询
        {
            total = 0;
            dt    = bll.GetContactList(model, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, ref total);
        }
        else//合同清单列表【根据单号,模糊查询】
        {
            total = 0;
            dt    = bll.GetFuzzyQuery(model, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, ref total);
        }

        AspNetPager1.RecordCount = total;

        if (dt != null && dt.Rows.Count > 0)
        {
            Repeater1.DataSource = dt;
            Repeater1.DataBind();
        }
        else
        {
            AspNetPager1.CurrentPageIndex = 1;
            Repeater1.DataSource          = null;
            Repeater1.DataBind();
        }
    }