Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        valObj.af_PageBy(TF_F_COLUMN.Attribute.COLUMN_ID, Order.Desc);
        title      = valObj._ZhName + "Ñ¡Ôñ";
        Page.Title = title;

        if (Request["formid"] != null)
        {
            condObj.FORM_ID = int.Parse(Request["formid"]);
        }
        if (!IsPostBack)
        {
            aspPager.CurrentPageIndex = 1;
            aspPager.PageSize         = 20;
            try
            {
                listObj = BLLTable <TF_F_COLUMN> .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;
        }
    }
Esempio n. 2
0
    private void BindList(TF_F_COLUMN condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//如果不存在用户定义的分页排序属性,则用主键属性排序
        {
            condObj.af_PageBy(TF_F_COLUMN.Attribute.SORT_NO, Order.Asc);
        }

        if (formid != "")
        {
            condObj.FORM_ID = int.Parse(formid);
        }

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

        repList.DataSource = listObj.Where(s => s.IS_DEFAULT == "0");
        repList.DataBind();
        aspPager.RecordCount = recount;

        //repDefault.DataSource = listObj.Where(s => s.IS_DEFAULT == "1");
        //repDefault.DataBind();

        TF_F_COLUMN ccc = new TF_F_COLUMN();

        if (Request["ntype"] == "TF_FORM-mx")
        {
            ccc.FORM_ID = -1;
        }
        else
        {
            ccc.FORM_ID = 0;
        }
        listObj = BLLTable <TF_F_COLUMN> .Factory(conn).Select(valObj, ccc);

        repDefault.DataSource = listObj;
        repDefault.DataBind();
    }
Esempio n. 3
0
    private void BindList(TF_F_COLUMN condObj, int curPage)
    {
        if (condObj.af_PageByAttributeItem == null)//����������û�����ķ�ҳ�������ԣ�����������������
            condObj.af_PageBy(TF_F_COLUMN.Attribute.SORT_NO, Order.Asc);

        if (formid != "") {
            condObj.FORM_ID = int.Parse(formid);
        }

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

        repList.DataSource = listObj.Where(s=>s.IS_DEFAULT=="0");
        repList.DataBind();
        aspPager.RecordCount = recount;

        //repDefault.DataSource = listObj.Where(s => s.IS_DEFAULT == "1");
        //repDefault.DataBind();

        TF_F_COLUMN ccc = new TF_F_COLUMN();
        if (Request["ntype"] == "form-mx")
        {
            ccc.FORM_ID = -1;
        }
        else
        {
            ccc.FORM_ID = 0;
        }
        listObj = BLLTable<TF_F_COLUMN>.Factory(conn).Select(valObj, ccc);
        repDefault.DataSource = listObj;
        repDefault.DataBind();
    }