Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP1);
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP2);
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP1);
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP2);
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP3);
        #endregion
        condObj.OrderBy(HR_SchClass.Attribute.SchClassid, Order.Desc);

        if (!IsPostBack)
        {
            btnFind.Text              = LanguageService.GetLanguageString("btnFind", "查询");
            aspPager.PageSize         = 10;
            aspPager.CurrentPageIndex = 1;

            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                HR_SchClass roleOld = new HR_SchClass();
                roleOld.Where(HR_SchClass.Attribute.SchClassid, Request["ids"].ToString());
                listObj = BLLTable <HR_SchClass> .Factory(conn).Select(valObj, roleOld);

                for (int i = 0; i < listObj.Count; i++)
                {
                    if (i > 0)
                    {
                        hidOld.Value     += ",";
                        hidInitIDS.Value += ",";
                    }
                    hidOld.Value     += "{ID:'" + listObj[i].SchClassid + "',Name:'" + listObj[i].SchClassid + "'}";//这里的Name用于显示在列表中,请自行重定义。
                    hidInitIDS.Value += listObj[i].SchClassid;
                }
            }
            try
            {
                listObj = BLLTable <HR_SchClass> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);

                repList.DataSource = listObj;
                repList.DataBind();
                aspPager.RecordCount = recount;
            }
            catch (Exception ex)
            {
                litWarn.Text = ex.Message;
            }
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region//默认隐藏的列
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP1);
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP2);
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP1);
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP2);
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP3);
        #endregion
        title      = valObj._ZhName + "管理";
        Page.Title = title;
        if (Request["PID"] != null)
        {
            pid = Request["PID"];
        }
        if (!IsPostBack)
        {
            string haveschidsStr = "";
            if (Request["haveschids"] != null)
            {
                haveschidsStr = Request["haveschids"];
                haveschidsStr = haveschidsStr.TrimEnd(',');
                if (string.IsNullOrEmpty(haveschidsStr))
                {
                    haveschidsStr = "-1";
                }
                condObj.Where(" {0} not in ({1}) ", HR_SchClass.Attribute.SchClassid.FieldName, haveschidsStr);
            }
            #region                                                                  //默认属性初始化
            aspPager.CurrentPageIndex = 1;
            aspPager.ShowInputBox     = AgileFrame.Core.WebSystem.ShowInputBox.Auto; //WebCtrls.
            txtPageSize.Value         = "30";
            aspPager.PageSize         = 30;
            if (pid == "" || pid == "0")
            {
                //a_top.Visible = false;
            }
            #endregion
            #region//数据初始化

            #endregion

            BindList(condObj, 1);
        }
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region//Ĭ�����ص���
        //hideTableColumnList = new List<AttributeItem>();
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP1);
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP2);
        //hideTableColumnList.Add(HR_SchClass.Attribute.EXP3);
        //valObj.LoadAllAttributes(true);//��ʱ�Ӵ˴��룬�Ժ��ܸ��½�����Ҫ
        //valObj.Remove(hideTableColumnList);

        //hideFindColumnList = new List<AttributeItem>();
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP1);
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP2);
        //hideFindColumnList.Add(HR_SchClass.Attribute.EXP3);
        #endregion
        condObj.OrderBy(HR_SchClass.Attribute.SchClassid, Order.Desc);

        if (!IsPostBack)
        {
            btnFind.Text = LanguageService.GetLanguageString("btnFind", "��ѯ");
            aspPager.PageSize = 10;
            aspPager.CurrentPageIndex = 1;

            if (!string.IsNullOrEmpty(Request["ids"]))
            {
                HR_SchClass roleOld = new HR_SchClass();
                roleOld.Where(HR_SchClass.Attribute.SchClassid, Request["ids"].ToString());
                listObj = BLLTable<HR_SchClass>.Factory(conn).Select(valObj, roleOld);
                for (int i = 0; i < listObj.Count; i++)
                {
                    if (i > 0)
                    {
                        hidOld.Value += ",";
                        hidInitIDS.Value += ",";
                    }
                    hidOld.Value += "{ID:'" + listObj[i].SchClassid + "',Name:'" + listObj[i].SchClassid + "'}";//�����Name������ʾ���б��У��������ض��塣
                    hidInitIDS.Value += listObj[i].SchClassid;
                }
            }
            try
            {

                listObj = BLLTable<HR_SchClass>.Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount);
                repList.DataSource = listObj;
                repList.DataBind();
                aspPager.RecordCount = recount;
            }
            catch (Exception ex)
            {
                 litWarn.Text = ex.Message;
            }

        }
    }