Ejemplo n.º 1
0
        protected void PageInit()
        {
            //部门编号
            int?DepartId = Utils.GetIntNull(Utils.GetQueryStringValue("departId"));
            //操作员
            string Operator = Utils.GetQueryStringValue("operator");
            //操作开始时间
            string BeginDate = Utils.GetQueryStringValue("txtBeginDate");
            //操作结束时间
            string EndDate = Utils.GetQueryStringValue("txtEndDate");

            //当前页
            pageIndex = UtilsCommons.GetPadingIndex();
            IList <EyouSoft.Model.ComStructure.MComDepartment> list1 = new EyouSoft.BLL.ComStructure.BComDepartment().GetList(SiteUserInfo.CompanyId);

            this.ddlDepart.DataTextField  = "DepartName";
            this.ddlDepart.DataValueField = "DepartId";
            this.ddlDepart.DataSource     = list1;
            this.ddlDepart.DataBind();
            this.ddlDepart.Items.Insert(0, new ListItem("请选择", "0"));
            IList <EyouSoft.Model.SysStructure.MSysLogHandleInfo> list = null;

            EyouSoft.Model.SysStructure.MSysLogHandleSearch search = new EyouSoft.Model.SysStructure.MSysLogHandleSearch();
            search.DeptId   = DepartId == 0 ? null : DepartId;
            search.Operator = Operator;
            if (BeginDate != "")
            {
                search.SDate = Utils.GetDateTime(BeginDate);
            }
            if (EndDate != "")
            {
                search.EDate = Utils.GetDateTime(EndDate);
            }
            list = new EyouSoft.BLL.SysStructure.BSysLogHandle().GetLogs(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, search);
            this.ddlDepart.SelectedValue = DepartId.ToString();
            this.txtOperator.Value       = Operator;
            this.txtBeginDate.Value      = BeginDate;
            this.txtEndDate.Value        = EndDate;
            if (list != null && list.Count > 0)
            {
                this.repList.DataSource = list;
                this.repList.DataBind();
                BindPage();
            }
            else
            {
                this.repList.EmptyText = "<tr><td colspan=\"6\" align=\"center\">未找到相关记录!</td></tr>";
            }
        }
Ejemplo n.º 2
0
        protected void PageInit()
        {
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            EyouSoft.Model.SysStructure.MSysLogLoginSearchInfo search = new EyouSoft.Model.SysStructure.MSysLogLoginSearchInfo();
            search.Name  = Utils.GetQueryStringValue("txtName");
            search.STime = string.IsNullOrEmpty(Utils.GetQueryStringValue("txtLoginTimeS")) ? null : (DateTime?)Utils.GetDateTime(Utils.GetQueryStringValue("txtLoginTimeS"));
            search.ETime = string.IsNullOrEmpty(Utils.GetQueryStringValue("txtLoginTimeE")) ? null : (DateTime?)Utils.GetDateTime(Utils.GetQueryStringValue("txtLoginTimeE"));

            var list = new EyouSoft.BLL.SysStructure.BSysLogHandle().GetLoginLogs(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, search);

            if (list != null && list.Count > 0)
            {
                this.repList.DataSource = list;
                this.repList.DataBind();
                BindPage();
            }
            else
            {
                this.repList.EmptyText = "<tr><td colspan=\"4\" align=\"center\">未找到相关记录!</td></tr>";
            }
        }