예제 #1
0
        /// <summary>
        /// 查询
        /// </summary>
        private void DoSelect()
        {
            EasyDictionary dic = SysEnumeration.GetEnumDict("EmpAppeal");

            dic.Add("%%", "请选择...");
            PageState.Add("AppealTypeName", dic);


            //问卷角色或管理员
            CommPowerSplit Role = new CommPowerSplit();

            if (Role.IsAppealRole(UserInfo.UserID, UserInfo.LoginName))
            {
                ents = UsrAppealList.FindAll(SearchCriterion);
                this.PageState.Add("UsrAppealListList", ents);
            }
            else
            {
                StringBuilder strb = new StringBuilder();
                if (Session["CompanyId"] != null)           //判断公司登陆
                {
                    SearchCriterion.SetSearch(UsrAppealList.Prop_CompanyId, Session["CompanyId"]);
                    ents = UsrAppealList.FindAll(SearchCriterion);
                    this.PageState.Add("UsrAppealListList", ents);
                }
                else
                {
                    var UsrEnt = SysUser.Find(UserInfo.UserID);
                    SearchCriterion.SetSearch(UsrAppealList.Prop_CompanyId, UsrEnt.Pk_corp);
                    ents = UsrAppealList.FindAll(SearchCriterion);
                    this.PageState.Add("UsrAppealListList", ents);
                }
            }
        }