private void BindDataSource()
        {
            var source = ProjectInfoLogic.GetProjectInfoByCondition(txtProjectName.Text.Trim());

            gvProjectInfo.DataSource = source;
            gvProjectInfo.DataBind();
            lblMessage.Text = " <span class='font14b'>共查到 </span><span class='fontred'>" + source.Count +
                              "</span><span class='font14b'> 条记录</span>";
        }
Exemple #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            _Context = context;
            _Result  = string.Empty;
            _Key     = _Context.Request.QueryString["q"] ?? "";
            if (context.Request.Params["type"] != null)
            {
                switch (context.Request.Params["type"])
                {
                //职位名称
                case "Position":
                    InitResult(BllInstance.PositionBllInstance.GetAllPosition(), "Name");
                    break;

                //所有有效帐号的姓名
                case "Account":
                    InitResult(BllInstance.AccountBllInstance.GetAccountByCondition("", null, null, true), "Name");
                    break;

                case "AllAccount":
                    InitResult(BllInstance.AccountBllInstance.GetAccountByCondition("", null, null, null), "Name");
                    break;

                //得到下属
                case "Subordinates":
                    InitResult(
                        BllInstance.AccountBllInstance.GetSubordinates(
                            (HttpContext.Current.Session[SessionKeys.LOGININFO] as Account).Id), "Name");
                    break;

                //所有Hrmis的有效帐号的姓名
                case "HrmisAccount":
                    InitResult(BllInstance.AccountBllInstance.GetAllHRMisAccount(), "Name");
                    break;

                //hrmis帐套项参数名称
                case "AccountSetPara":
                    AccountSetPara();
                    break;

                case "ProjectInfo":
                    InitResult(ProjectInfoLogic.GetProjectInfoByCondition(""), "ProjectName");
                    break;

                default:
                    break;
                }
            }
            context.Response.Write(_Result);
            context.Response.End();
        }