Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.Params["action"] == "lock")
     {
         if (string.IsNullOrEmpty(Request.Params["ip"]))
         {
             Response.Write("-1");
             Response.End();
         }
         ILockIpInfoService lockIpInfoService = IoC.Resolve <ILockIpInfoService>();
         lockIpInfoService.Create(new Ytg.BasicModel.LockIpInfo()
         {
             Ip         = Request.Params["ip"],
             LockReason = Request.Params["des"],
             OccDate    = DateTime.Now,
             IpCityName = Utils.GetCityByIp(Request.Params["ip"])
         });
         lockIpInfoService.Save();
         Response.Write("0");
         Response.End();
     }
     if (!IsPostBack)
     {
         this.Bind();
     }
 }
Example #2
0
        private void Bind()
        {
            ILockIpInfoService lockIpInfoService = IoC.Resolve <ILockIpInfoService>();

            this.repList.DataSource = lockIpInfoService.GetAll().ToList();
            this.repList.DataBind();
        }
Example #3
0
        protected void btnDel_Command(object sender, CommandEventArgs e)
        {
            var cmd = e.CommandArgument;

            if (null == cmd)
            {
                JsAlert("操作失败!");
                return;
            }
            ILockIpInfoService lockIpInfoService = IoC.Resolve <ILockIpInfoService>();

            lockIpInfoService.Delete(Convert.ToInt32(cmd.ToString()));
            lockIpInfoService.Save();
            JsAlert("删除成功");
            this.Bind();
        }
 public InitialRequestManager(ISysUserService sysUserService,
                              ISysUserBalanceService sysUserBalanceService,
                              ISysUserBalanceDetailService SysUserBalanceDetailService,
                              INewsService newsService, IHotLotteryService hotLotteryService,
                              IBannerService bannerService, IMarketService marketservice,
                              ISysQuotaService sysQuotaService,
                              ISysSettingService sysSettingService,
                              ILockIpInfoService lockIpInfoService,
                              ILotteryIssueService lotteryIssueService)
 {
     this.mSysUserService              = sysUserService;
     this.mSysUserBalanceService       = sysUserBalanceService;
     this.mSysUserBalanceDetailService = SysUserBalanceDetailService;
     this.mNewsService         = newsService;
     this.mHotLotteryService   = hotLotteryService;
     this.mBannerService       = bannerService;
     this.mMarketService       = marketservice;
     this.mSysQuotaService     = sysQuotaService;
     this.mSysSettingService   = sysSettingService;
     this.mLockIpInfoService   = lockIpInfoService;
     this.mLotteryIssueService = lotteryIssueService;
 }