Exemple #1
0
        private string UserLogin()
        {
            string un = Utils.GetFormValue("userName");
            string pw = Utils.GetFormValue("userPwd");

            if (string.IsNullOrEmpty(un))
            {
                return(UtilsCommons.AjaxReturnJson("0", "请填写用户名!"));
            }
            if (string.IsNullOrEmpty(pw))
            {
                return(UtilsCommons.AjaxReturnJson("0", "请填写密码!"));
            }

            EyouSoft.Model.SSOStructure.MUserInfo userInfo = new Eyousoft_yhq.BLL.MemberLogin().isLogin(un, pw);


            bool isUserValid = userInfo != null ? true : false;

            if (isUserValid)
            {
                return(UtilsCommons.AjaxReturnJson("1", "登陆成功"));
            }
            else
            {
                return(UtilsCommons.AjaxReturnJson("0", "手机号码或者密码错误!"));
            }
        }
Exemple #2
0
        private string UserLogin()
        {
            string un = Utils.GetFormValue(txtUserName.UniqueID);
            string pw = Utils.GetFormValue(txtPassWord.UniqueID);

            if (string.IsNullOrEmpty(un))
            {
                return(UtilsCommons.AjaxReturnJson("0", "请填写用户名!"));
            }
            if (string.IsNullOrEmpty(pw))
            {
                return(UtilsCommons.AjaxReturnJson("0", "请填写密码!"));
            }
            Eyousoft_yhq.BLL.MemberLogin          MLogin = new Eyousoft_yhq.BLL.MemberLogin();
            EyouSoft.Model.SSOStructure.MUserInfo Muser  = MLogin.isLogin(un, pw);

            bool isUserValid = Muser != null ? true : false;

            if (isUserValid)
            {
                return(UtilsCommons.AjaxReturnJson("1", "登陆成功"));
            }
            else
            {
                return(UtilsCommons.AjaxReturnJson("0", "手机号码或者密码错误!"));
            }
        }
Exemple #3
0
        private string UserLogin()
        {
            string un = Utils.GetFormValue("userName");
            string pw = Utils.GetFormValue("userPwd");

            if (string.IsNullOrEmpty(un))
            {
                return UtilsCommons.AjaxReturnJson("0", "请填写用户名!");
            }
            if (string.IsNullOrEmpty(pw))
            {
                return UtilsCommons.AjaxReturnJson("0", "请填写密码!");
            }

            EyouSoft.Model.SSOStructure.MUserInfo userInfo = new Eyousoft_yhq.BLL.MemberLogin().isLogin(un, pw);

            bool isUserValid = userInfo != null ? true : false;

            if (isUserValid)
            {
                return UtilsCommons.AjaxReturnJson("1", "登陆成功");
            }
            else
            {
                return UtilsCommons.AjaxReturnJson("0", "手机号码或者密码错误!");
            }
        }
Exemple #4
0
        protected void save()
        {
            var model = new Eyousoft_yhq.Model.User();
            Eyousoft_yhq.BLL.Member bll = new Eyousoft_yhq.BLL.Member();

            model.ContactSex = (sexType)Utils.GetInt(Utils.GetFormValue(ddl_sex.UniqueID));
            model.UserName = Utils.GetFormValue("userName");
            model.UserPwd = Utils.GetFormValue("userPwd");
            model.ContactName = Utils.GetFormValue("contactName");
            model.PollCode = Utils.GetFormValue("PollCode");
            model.YuE = 0M;
            model.IssueTime = DateTime.Now;
            bool result = bll.Add(model);
            if (result)
            {
                EyouSoft.Model.SSOStructure.MUserInfo userInfo = new Eyousoft_yhq.BLL.MemberLogin().isLogin(model.UserName, model.UserPwd);
                Response.Redirect("/AppPage/Default.aspx");
            }
        }
Exemple #5
0
        /// <summary>
        /// 添加用户
        /// </summary>
        protected string save()
        {
            var model = new Eyousoft_yhq.Model.User();

            Eyousoft_yhq.BLL.Member bll = new Eyousoft_yhq.BLL.Member();

            model.ContactSex  = (sexType)Utils.GetInt(Utils.GetFormValue("userSex"));
            model.UserName    = Utils.GetFormValue("userName");
            model.UserPwd     = Utils.GetFormValue("userPwd");
            model.ContactName = Utils.GetFormValue("contactName");
            model.PollCode    = Utils.GetFormValue("userPollCode");
            model.IsAgent     = false;
            model.IssueTime   = DateTime.Now;
            //string ViaCode = Utils.GetFormValue("userViaCode");
            model.YuE = 0M;
            string          msg  = string.Empty;
            List <string[]> list = new List <string[]>();
            //list = Session[model.UserName] as List<string[]>;
            //if (list != null)
            //{
            //    for (int i = 0; i < list.Count; i++)
            //    {
            //        if (ViaCode == list[i][1] && DateTime.Compare(Convert.ToDateTime(list[i][2]).AddMinutes(5), DateTime.Now) > 0)
            //        {
            //            msg = list[i][1];
            //        }
            //    }
            //}
            //if (string.IsNullOrEmpty(msg))
            //{
            //    return UtilsCommons.AjaxReturnJson("0", "请填写正确的验证码!");
            //}
            bool result = bll.Add(model);

            Session.Remove(model.UserName);
            if (result)
            {
                Session.Remove(model.UserName);
                EyouSoft.Model.SSOStructure.MUserInfo userInfo = new Eyousoft_yhq.BLL.MemberLogin().isLogin(model.UserName, model.UserPwd);
            }

            return(UtilsCommons.AjaxReturnJson("1", string.Format("注册{0}", result ? "成功,正在跳转页面,请稍后 !" : "失败!请稍后再试")));
        }
Exemple #6
0
        /// <summary>
        /// 添加用户
        /// </summary>
        protected string save()
        {
            var model = new Eyousoft_yhq.Model.User();
            Eyousoft_yhq.BLL.Member bll = new Eyousoft_yhq.BLL.Member();

            model.ContactSex = (sexType)Utils.GetInt(Utils.GetFormValue("userSex"));
            model.UserName = Utils.GetFormValue("userName");
            model.UserPwd = Utils.GetFormValue("userPwd");
            model.ContactName = Utils.GetFormValue("contactName");
            model.PollCode = Utils.GetFormValue("userPollCode");
            model.IsAgent = false;
            model.IssueTime = DateTime.Now;
            //string ViaCode = Utils.GetFormValue("userViaCode");
            model.YuE = 0M;
            string msg = string.Empty;
            List<string[]> list = new List<string[]>();
            //list = Session[model.UserName] as List<string[]>;
            //if (list != null)
            //{
            //    for (int i = 0; i < list.Count; i++)
            //    {
            //        if (ViaCode == list[i][1] && DateTime.Compare(Convert.ToDateTime(list[i][2]).AddMinutes(5), DateTime.Now) > 0)
            //        {
            //            msg = list[i][1];
            //        }
            //    }
            //}
            //if (string.IsNullOrEmpty(msg))
            //{
            //    return UtilsCommons.AjaxReturnJson("0", "请填写正确的验证码!");
            //}
            bool result = bll.Add(model);
            Session.Remove(model.UserName);
            if (result)
            {
                Session.Remove(model.UserName);
                EyouSoft.Model.SSOStructure.MUserInfo userInfo = new Eyousoft_yhq.BLL.MemberLogin().isLogin(model.UserName, model.UserPwd);
            }

            return UtilsCommons.AjaxReturnJson("1", string.Format("注册{0}", result ? "成功,正在跳转页面,请稍后 !" : "失败!请稍后再试"));
        }
Exemple #7
0
        protected void save()
        {
            var model = new Eyousoft_yhq.Model.User();

            Eyousoft_yhq.BLL.Member bll = new Eyousoft_yhq.BLL.Member();

            model.ContactSex  = (sexType)Utils.GetInt(Utils.GetFormValue(ddl_sex.UniqueID));
            model.UserName    = Utils.GetFormValue("userName");
            model.UserPwd     = Utils.GetFormValue("userPwd");
            model.ContactName = Utils.GetFormValue("contactName");
            model.PollCode    = Utils.GetFormValue("PollCode");
            model.YuE         = 0M;
            model.IssueTime   = DateTime.Now;
            bool result = bll.Add(model);

            if (result)
            {
                EyouSoft.Model.SSOStructure.MUserInfo userInfo = new Eyousoft_yhq.BLL.MemberLogin().isLogin(model.UserName, model.UserPwd);
                Response.Redirect("/AppPage/Default.aspx");
            }
        }
Exemple #8
0
        protected bool login(string UN, string PW)
        {
            var userModel = new Eyousoft_yhq.BLL.MemberLogin().isLogin(UN, PW);

            return userModel == null ? false : true;
        }
Exemple #9
0
        protected bool login(string UN, string PW)
        {
            var userModel = new Eyousoft_yhq.BLL.MemberLogin().isLogin(UN, PW);

            return(userModel == null ? false : true);
        }