Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        valObj.af_PageBy(TF_FORM.Attribute.TB_ID, Order.Desc);
        title             = valObj._ZhName + "选择";
        condObj.M_FORM_ID = 0;
        Page.Title        = title;
        if (!IsPostBack)
        {
            aspPager.CurrentPageIndex = 1;
            aspPager.PageSize         = 20;
            try
            {
                if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
                {
                    condObj.af_PageBy(TF_FORM.Attribute.FORM_ID, Order.Desc);
                }
                listObj = BLLTable <TF_FORM> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

                repCus.DataSource = listObj;
                repCus.DataBind();
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
            aspPager.RecordCount = recount;
        }
    }
Exemple #2
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        try
        {
            condObj = new TF_FORM();



            if (txtF_NAME.Value != "")
            {
                condObj.Like(TF_FORM.Attribute.F_NAME, Convert.ToString(txtF_NAME.Value));
            }


            if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
            {
                condObj.af_PageBy(TF_FORM.Attribute.FORM_ID, Order.Desc);
            }
            listObj = BLLTable <TF_FORM> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
        aspPager.RecordCount = recount;
    }
Exemple #3
0
    private void BindList(TF_FORM condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
        {
            condObj.af_PageBy(TF_FORM.Attribute.FORM_ID, Order.Desc);
        }

        #region//数据权限条件

        #endregion
        //condObj.PID = decimal.Parse(pid);

        listObj = BLLTable <TF_FORM> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);

        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;
    }
Exemple #4
0
    protected void btnFind_Click(object sender, EventArgs e)
    {
        try
        {
            condObj = new TF_FORM();

            if(txtF_NAME.Value !="" )
                condObj.Like(TF_FORM.Attribute.F_NAME, Convert.ToString(txtF_NAME.Value));

            if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ�����������������
                condObj.af_PageBy(TF_FORM.Attribute.FORM_ID, Order.Desc);
            listObj = BLLTable<TF_FORM>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);
            repCus.DataSource = listObj;
            repCus.DataBind();
        }
        catch (Exception ex)
        {
            litWarn.Text = ex.Message;
        }
        aspPager.RecordCount = recount;
    }
    private void BindList(TF_FORM condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ�����������������
            condObj.af_PageBy(TF_FORM.Attribute.FORM_ID, Order.Desc);

        #region//����Ȩ������

        #endregion
        //condObj.PID = decimal.Parse(pid);

        listObj = BLLTable<TF_FORM>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, curPage, ref recount);
        repList.DataSource = listObj;
        repList.DataBind();
        aspPager.RecordCount = recount;
    }