Exemplo n.º 1
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = MXRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            var bll = new ManagerLogService();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("manager_log.aspx", "keywords={0}&page={1}", this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
//            if (!Page.IsPostBack)
//            {
                var admin_info = GetAdminInfo(); //管理员信息
                //登录信息
                if (admin_info != null)
                {
                    var managerLogService = new ManagerLogService();
                    //BLL.manager_log bll = new BLL.manager_log();
                    var log = managerLogService.GetModel(admin_info.UserName, 1, MXEnums.ActionEnum.Login.ToString());
                    if (log != null)
                    {
                        //本次登录
                        litIP.Text = log.UserIp;
                    }
                    var log2 = managerLogService.GetModel(admin_info.UserName, 2, MXEnums.ActionEnum.Login.ToString());
                    if (log2 != null)
                    {
                        //上一次登录
                        litBackIP.Text = log2.UserIp;
                        litBackTime.Text = log2.AddTime.ToString();
                    }

                    if (IsWeiXinCode())
                    {
                        _userType = "ScenicAdmin";//景区管理员
                    }
                    //else if (IsShopAdmin(admin_info.id))
                    //{
                    //    _userType = "ShopAdmin";//餐饮管理员
                    //}
                    else if (IsHotelAdmin(admin_info.Id))
                    {
                        _userType = "HotelAdmin";//酒店管理员
                    }
                }

                //LitUpgrade.Text = Utils.GetDomainStr(MXKeys.CACHE_OFFICIAL_UPGRADE, DESEncrypt.Decrypt(MXKeys.FILE_URL_UPGRADE_CODE));
                //LitNotice.Text = Utils.GetDomainStr(MXKeys.CACHE_OFFICIAL_NOTICE, DESEncrypt.Decrypt(MXKeys.FILE_URL_NOTICE_CODE));
                //Utils.GetDomainStr("dt_cache_domain_info", "http://www.WeiXinPF.net/upgrade.ashx?u=" + Request.Url.DnsSafeHost + "&i=" + Request.ServerVariables["LOCAL_ADDR"]);

              
//            }
        }
Exemplo n.º 3
0
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("manager_log", MXEnums.ActionEnum.Delete.ToString()); //检查权限
     var bll = new ManagerLogService();
     int sucCount = bll.Delete(7);
     AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "删除管理日志" + sucCount + "条"); //记录日志
     JscriptMsg("删除日志" + sucCount + "条", Utils.CombUrlTxt("manager_log.aspx", "keywords={0}", this.keywords), "Success");
 }
Exemplo n.º 4
0
 /// <summary>
 /// 写入管理日志
 /// </summary>
 /// <param name="actionType"></param>
 /// <param name="remark"></param>
 /// <returns></returns>
 public bool AddAdminLog(string actionType, string remark)
 {
     if (siteConfig.logstatus > 0)
     {
         var model = GetAdminInfo();
         int newId = new ManagerLogService().Add(model.Id, Session.SessionID, model.UserName, actionType, remark);
         if (newId > 0)
         {
             return true;
         }
     }
     return false;
 }
Exemplo n.º 5
0
 /// <summary>
 /// 写入管理日志
 /// </summary>
 /// <param name="action_type"></param>
 /// <param name="remark"></param>
 /// <returns></returns>
 public bool AddAdminLog(string action_type, string remark)
 {
     if (siteConfig.logstatus > 0)
     {
         var model = GetAdminInfo();
         int newId = new ManagerLogService(new ManagerLogRepository(siteConfig.sysdatabaseprefix)).Add(model.id, model.user_name, action_type, remark);
         if (newId > 0)
         {
             return true;
         }
     }
     return false;
 }