Exemple #1
0
        //经纬度,mac,手机版本,手机品牌,手机系统
        public bool Record(long _userid, string longitude, string mac, string version, string brand, string system)
        {
            lgk.BLL.tb_user userbll = new lgk.BLL.tb_user();
            var             user    = userbll.GetModel(_userid);

            if (user == null)
            {
                LogHelper.SaveLog("userid:" + _userid + " 不存在", "applog");
                return(false);
            }

            lgk.Model.AppLog model = new lgk.Model.AppLog()
            {
                UserID       = _userid,
                UserCode     = user.UserCode,
                UserName     = user.NiceName,
                Mobile       = user.PhoneNum,
                Longitude    = longitude,
                MAC          = mac,
                PhoneVersion = version,
                PhoneBrand   = brand,
                PhoneSystem  = system,
                AddTime      = DateTime.Now
            };

            lgk.BLL.AppLog logbll = new lgk.BLL.AppLog();
            logbll.Add(model);

            return(true);
        }
Exemple #2
0
        public void GetQuest()
        {
            string question = Request["question"].ToString();
            string answer   = Request["answer"].ToString();
            string name     = Request["ucode"].ToString();

            lgk.Model.tb_user LoginUser = null;
            int num = ConvertToInt(Session["num"]);

            if (num > 3)
            {
                Response.Write("4");
                return;
            }
            try
            {
                LoginUser = new lgk.BLL.tb_user().GetModel(name == "" ? " 1<>1 " : " usercode ='" + name + "'");
            }
            catch (Exception)
            {
                Response.Write("1");
                return;
            }
            if (LoginUser == null)
            {
                Response.Write("1");
                return;
            }
            if (LoginUser.User009 != question)
            {
                num++;
                Session["num"] = num;
                Response.Write("2");
                return;
            }
            if (LoginUser.User010 != answer)
            {
                num++;
                Session["num"] = num;
                Response.Write("3");
                return;
            }
            Session["userCount"] = 0;
            LoginUser.Password   = PageValidate.GetMd5("111111");
            if (userBLL.Update(LoginUser))
            {
                Response.Write("5");
                return;
            }
            else
            {
                Response.Write("6");
                return;
            }
        }
Exemple #3
0
        private void bind_pro()
        {
            LoginUser          = new lgk.BLL.tb_user().GetModel(LoginUser.UserID);
            lbBonusAccout.Text = "0";
            if (LoginUser != null)
            {
                lbBonusAccout.Text = LoginUser.BonusAccount + "";
            }

            bind_repeater(proBLL.GetList(" UserID=" + getLoginID()), Repeater1, "AddDate desc", tr1, AspNetPager1);
        }