Example #1
0
 //
 public bool Update(WebUserVeri model)
 {
     try
     {
         StringBuilder strSql = new StringBuilder();
         strSql.Append("update T_WebUserVeri set ");
         strSql.Append("LoginName=@LoginName,");
         strSql.Append("LoginPass=@LoginPass,");
         strSql.Append("UserName=@UserName,");
         strSql.Append("UserTel=@UserTel,");
         strSql.Append("UserEmail=@UserEmail,");
         strSql.Append("UserStatus=@UserStatus,");
         strSql.Append("LoginDate=@LoginDate,");
         strSql.Append("LoginnNum=@LoginnNum,");
         strSql.Append("OutDate=@OutDate,");
         strSql.Append("Veri=@Veri");
         strSql.Append(" where Id=@Id");
         if (DbHelperSQL.ExecuteSql(strSql.ToString(), GetSqlParameter(model)) > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch { throw; }
 }
Example #2
0
 private string Delete(HttpContext context)
 {
     try
     {
         SysLogBll.Create("网站会员", "删除网站会员操作", adminUser.AdminName);
         int id = 0;
         try { id = int.Parse(context.Request.QueryString["Id"].ToString()); }
         catch { }
         WebUserVeri webUser = dal.GetModel(id);
         if (dal.Delete(id))
         {
             new AuditOpinionDal().Delete(webUser.Id);
             return("删除操作成功!");
         }
         else
         {
             return("删除失败请重新操作,错误代码:500 ");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return(string.Empty);
     }
 }
Example #3
0
 /// <summary>
 /// 用户登录
 /// </summary>
 /// <param name="adminLogName"></param>
 /// <param name="adminLogPass"></param>
 /// <returns></returns>
 public dynamic UserLogin(string LoginName, string LoginPass)
 {
     try
     {
         string  strSql = string.Format(" select  top 1 Id,LoginName,LoginPass,UserName,UserTel,UserEmail,UserStatus,LoginDate,LoginnNum,OutDate,Veri,MemberTypeId,VeriName,VeriSex,VeriIDCard,VeriIDCardScan,OrgCode,VeriAddress,VeriTel,VeriCorporate,VeriCorporateIDCard,VeriCorporateIDCardScan,VeriCreditCode,VeriCreditCodeScan,VeriStatus,AuditType,VeriCheckName,VeriApplyDate,VeriCheckDate from T_WebUserVeri where LoginName='{0}' and LoginPass='******'", LoginName, LoginPass);
         dynamic model  = null;
         using (dynamic read = DbHelperSQL.ExecuteReader(strSql))
         {
             if (read.Read())
             {
                 model = new WebUserVeri();
                 try { model.Id = int.Parse(read["Id"].ToString()); }
                 catch { }
                 model.LoginName = read["LoginName"].ToString();
                 model.LoginPass = read["LoginPass"].ToString();
                 model.UserName  = read["UserName"].ToString();
                 model.UserTel   = read["UserTel"].ToString();
                 model.UserEmail = read["UserEmail"].ToString();
                 try { model.UserStatus = int.Parse(read["UserStatus"].ToString()); }
                 catch { }
                 try { model.LoginDate = DateTime.Parse(read["LoginDate"].ToString()); }
                 catch { }
                 try { model.LoginnNum = int.Parse(read["LoginnNum"].ToString()); }
                 catch { }
                 try { model.OutDate = DateTime.Parse(read["OutDate"].ToString()); }
                 catch { }
                 try { model.Veri = int.Parse(read["Veri"].ToString()); }
                 catch { }
                 try { model.MemberTypeId = int.Parse(read["MemberTypeId"].ToString()); }
                 catch { }
                 model.VeriName                = read["VeriName"].ToString();
                 model.VeriSex                 = read["VeriSex"].ToString();
                 model.VeriIDCard              = read["VeriIDCard"].ToString();
                 model.VeriIDCardScan          = read["VeriIDCardScan"].ToString();
                 model.OrgCode                 = read["OrgCode"].ToString();
                 model.VeriAddress             = read["VeriAddress"].ToString();
                 model.VeriTel                 = read["VeriTel"].ToString();
                 model.VeriCorporate           = read["VeriCorporate"].ToString();
                 model.VeriCorporateIDCard     = read["VeriCorporateIDCard"].ToString();
                 model.VeriCorporateIDCardScan = read["VeriCorporateIDCardScan"].ToString();
                 model.VeriCreditCode          = read["VeriCreditCode"].ToString();
                 model.VeriCreditCodeScan      = read["VeriCreditCodeScan"].ToString();
                 try { model.VeriStatus = int.Parse(read["VeriStatus"].ToString()); }
                 catch { }
                 try { model.AuditType = int.Parse(read["AuditType"].ToString()); }
                 catch { }
                 model.VeriCheckName = read["VeriCheckName"].ToString();
                 try { model.VeriApplyDate = DateTime.Parse(read["VeriApplyDate"].ToString()); }
                 catch { }
                 try { model.VeriCheckDate = DateTime.Parse(read["VeriCheckDate"].ToString()); }
                 catch { }
             }
             read.Dispose();
         }
         return(model);
     }
     catch { throw; }
 }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            WebUserVeri user = null;

            try
            {
                user = Session["UserSession"] as WebUserVeri;
                if (null == user)
                {
                    if (!string.IsNullOrEmpty(Request.Cookies["UserCookies"].Value))
                    {
                        user = new GetUserCookiesPlug().GetVeriUserCookies(Request.Cookies["UserCookies"]["UserSession"]);
                        Session["UserSession"] = user;
                    }
                }
                UserName = !string.IsNullOrEmpty(user.UserName) ? user.UserName : user.VeriName;
                if (user.VeriSex.Equals("男"))
                {
                    UserName += " 先生";
                }
                if (user.VeriSex.Equals("女"))
                {
                    UserName += " 女士";
                }
                if (user.Veri == 1)
                {
                    UserName += " [高级会员]";
                }
                else
                {
                    UserName += " [普通会员]";
                }
            }
            catch
            {
                user = null;
            }
            if (null == user)
            {
                Response.Redirect("~/User/UsLogin.aspx", true);
            }
            int aa = user.Veri;

            if (user.Veri == 0)
            {
                Menus = "<div class=\"userright\"><ul class=\"userbg\"><li class=\"a3\">会员信息</li><li><a id=\"lnkao\">基本信息</a></li><li class=\"bg2\"><a id=\"lnkat\">我要认证</a></li></ul><ul><li class=\"a1\">意向信息发布</li><li class=\"bg8\"><a id=\"lnkdo\">受让/转让/抵押融资</a></li></ul></div>";
            }
            else
            {
                Menus = "<div class=\"userright\"><ul class=\"userbg\"><li class=\"a3\">会员信息</li><li><a id=\"lnkao\">基本信息</a></li><li class=\"bg2\"><a id=\"lnkat\">我要认证</a></li></ul><ul><li class=\"a4\">出让/受让方</li><li class=\"bg3\"><a id=\"lnkbo\">出让方/受让方信息</a></li></ul><ul class=\"userbg\"><li class=\"a2\">招/投标</li><li class=\"bg5\"><a id=\"lnkco\">出让标信息</a></li><li class=\"bg6\"><a id=\"lnkct\">受让标信息</a></li><li class=\"bg7\"><a id=\"lnkcs\">进度查看</a></li></ul><ul><li class=\"a1\">意向信息发布</li><li class=\"bg8\"><a id=\"lnkdo\">受让/转让/抵押融资</a></li></ul></div>";
            }
        }
Example #5
0
 //
 public bool Update(WebUserVeri model)
 {
     try
     {
         StringBuilder strSql = new StringBuilder();
         strSql.Append("update T_WebUserVeri set ");
         strSql.Append("LoginName=@LoginName,");
         strSql.Append("LoginPass=@LoginPass,");
         strSql.Append("UserName=@UserName,");
         strSql.Append("UserTel=@UserTel,");
         strSql.Append("UserEmail=@UserEmail,");
         strSql.Append("UserStatus=@UserStatus,");
         strSql.Append("LoginDate=@LoginDate,");
         strSql.Append("LoginnNum=@LoginnNum,");
         strSql.Append("OutDate=@OutDate,");
         strSql.Append("Veri=@Veri,");
         strSql.Append("MemberTypeId=@MemberTypeId,");
         strSql.Append("VeriName=@VeriName,");
         strSql.Append("VeriSex=@VeriSex,");
         strSql.Append("VeriIDCard=@VeriIDCard,");
         strSql.Append("VeriIDCardScan=@VeriIDCardScan,");
         strSql.Append("OrgCode=@OrgCode,");
         strSql.Append("VeriAddress=@VeriAddress,");
         strSql.Append("VeriTel=@VeriTel,");
         strSql.Append("VeriCorporate=@VeriCorporate,");
         strSql.Append("VeriCorporateIDCard=@VeriCorporateIDCard,");
         strSql.Append("VeriCorporateIDCardScan=@VeriCorporateIDCardScan,");
         strSql.Append("VeriCreditCode=@VeriCreditCode,");
         strSql.Append("VeriCreditCodeScan=@VeriCreditCodeScan,");
         strSql.Append("VeriStatus=@VeriStatus,");
         strSql.Append("AuditType=@AuditType,");
         strSql.Append("VeriCheckName=@VeriCheckName,");
         strSql.Append("VeriApplyDate=@VeriApplyDate,");
         strSql.Append("VeriCheckDate=@VeriCheckDate");
         strSql.Append(" where Id=@Id");
         if (DbHelperSQL.ExecuteSql(strSql.ToString(), GetSqlParameter(model)) > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch { throw; }
 }
Example #6
0
        private dynamic GetModel(HttpContext context)
        {
            dynamic model = new WebUserVeri();

            model.Id         = 0;
            model.LoginName  = context.Request.Form["LoginName"].ToString();
            model.LoginPass  = context.Request.Form["LoginPass"].ToString();
            model.UserName   = context.Request.Form["UserName"].ToString();
            model.UserTel    = context.Request.Form["UserTel"].ToString();
            model.UserEmail  = context.Request.Form["UserEmail"].ToString();
            model.UserStatus = 0;//默认账号禁用的
            //model.UserStatus = 1;//账号启用的
            model.LoginDate = DateTime.Now;
            model.LoginnNum = 0;
            model.OutDate   = DateTime.Now;
            model.Veri      = 0;
            return(model);
        }
Example #7
0
 //
 public dynamic GetModel(int Id)
 {
     try
     {
         dynamic       model  = null;
         StringBuilder strSql = new StringBuilder();
         strSql.Append(" SELECT [Id],[LoginName],[LoginPass],[UserName],[UserTel],[UserEmail],[UserStatus],[LoginDate],[LoginnNum],[OutDate],[Veri] FROM [T_WebUserVeri] ");
         strSql.Append(" where Id=@Id");
         SqlParameter[] parameters =
         {
             new SqlParameter("@Id", SqlDbType.Int, 4)
         };
         parameters[0].Value = Id;
         using (dynamic read = DbHelperSQL.ExecuteReader(strSql.ToString(), parameters))
         {
             if (read.Read())
             {
                 model = new WebUserVeri();
                 try { model.Id = int.Parse(read["Id"].ToString()); }
                 catch { }
                 model.LoginName = read["LoginName"].ToString();
                 model.LoginPass = read["LoginPass"].ToString();
                 model.UserName  = read["UserName"].ToString();
                 model.UserTel   = read["UserTel"].ToString();
                 model.UserEmail = read["UserEmail"].ToString();
                 try { model.UserStatus = int.Parse(read["UserStatus"].ToString()); }
                 catch { }
                 try { model.LoginDate = DateTime.Parse(read["LoginDate"].ToString()); }
                 catch { }
                 try { model.LoginnNum = int.Parse(read["LoginnNum"].ToString()); }
                 catch { }
                 try { model.OutDate = DateTime.Parse(read["OutDate"].ToString()); }
                 catch { }
                 try { model.Veri = int.Parse(read["Veri"].ToString()); }
                 catch { }
             }
             read.Dispose();
         }
         return(model);
     }
     catch { throw; }
 }
Example #8
0
 public bool Create(WebUserVeri model)
 {
     try
     {
         StringBuilder strSql = new StringBuilder();
         strSql.Append("insert into T_WebUserVeri(");
         strSql.Append("LoginName,LoginPass,UserName,UserTel,UserEmail,UserStatus,LoginDate,LoginnNum,OutDate,Veri,MemberTypeId,VeriName,VeriSex,VeriIDCard,VeriIDCardScan,OrgCode,VeriAddress,VeriTel,VeriCorporate,VeriCorporateIDCard,VeriCorporateIDCardScan,VeriCreditCode,VeriCreditCodeScan,VeriStatus,AuditType,VeriCheckName,VeriApplyDate,VeriCheckDate)");
         strSql.Append(" values (");
         strSql.Append("@LoginName,@LoginPass,@UserName,@UserTel,@UserEmail,@UserStatus,@LoginDate,@LoginnNum,@OutDate,@Veri,@MemberTypeId,@VeriName,@VeriSex,@VeriIDCard,@VeriIDCardScan,@OrgCode,@VeriAddress,@VeriTel,@VeriCorporate,@VeriCorporateIDCard,@VeriCorporateIDCardScan,@VeriCreditCode,@VeriCreditCodeScan,@VeriStatus,@AuditType,@VeriCheckName,@VeriApplyDate,@VeriCheckDate)");
         if (DbHelperSQL.ExecuteSql(strSql.ToString(), GetSqlParameter(model)) > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch { throw; }
 }
Example #9
0
 public bool Create(WebUserVeri model)
 {
     try
     {
         StringBuilder strSql = new StringBuilder();
         strSql.Append("insert into T_WebUserVeri(");
         strSql.Append("LoginName,LoginPass,UserName,UserTel,UserEmail,UserStatus,LoginDate,LoginnNum,OutDate,Veri)");
         strSql.Append(" values (");
         strSql.Append("@LoginName,@LoginPass,@UserName,@UserTel,@UserEmail,@UserStatus,@LoginDate,@LoginnNum,@OutDate,@Veri)");
         if (DbHelperSQL.ExecuteSql(strSql.ToString(), GetSqlParameter(model)) > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch { throw; }
 }
Example #10
0
        //
        private dynamic GetUserModel(HttpContext context)
        {
            dynamic model = new WebUserVeri();

            try { model.Id = user.Id; }
            catch { }
            model.LoginName = context.Request.Form["LoginName"].ToString();
            model.LoginPass = context.Request.Form["LoginPass"].ToString();
            model.UserName  = context.Request.Form["UserName"].ToString();
            model.UserTel   = context.Request.Form["UserTel"].ToString();
            model.UserEmail = context.Request.Form["UserEmail"].ToString();
            try { model.UserStatus = int.Parse(context.Request.Form["UserStatus"].ToString()); }
            catch { model.UserStatus = 0; }
            try { model.LoginDate = DateTime.Parse(context.Request.Form["LoginDate"].ToString()); }
            catch { model.LoginDate = DateTime.Now; }
            try { model.LoginnNum = int.Parse(context.Request.Form["LoginnNum"].ToString()); }
            catch { model.LoginnNum = 0; }
            try { model.OutDate = DateTime.Parse(context.Request.Form["OutDate"].ToString()); }
            catch { model.OutDate = DateTime.Now; }
            try { model.Veri = int.Parse(context.Request.Form["Veri"].ToString()); }
            catch { model.Veri = 0; }
            return(model);
        }
Example #11
0
 //
 public dynamic GetModel(int Id)
 {
     try
     {
         dynamic       model  = null;
         StringBuilder strSql = new StringBuilder();
         strSql.Append(" select  top 1 Id,LoginName,LoginPass,UserName,UserTel,UserEmail,UserStatus,LoginDate,LoginnNum,OutDate,Veri,MemberTypeId,VeriName,VeriSex,VeriIDCard,VeriIDCardScan,OrgCode,VeriAddress,VeriTel,VeriCorporate,VeriCorporateIDCard,VeriCorporateIDCardScan,VeriCreditCode,VeriCreditCodeScan,VeriStatus,AuditType,VeriCheckName,VeriApplyDate,VeriCheckDate from T_WebUserVeri ");
         strSql.Append(" where Id=@Id");
         SqlParameter[] parameters =
         {
             new SqlParameter("@Id", SqlDbType.Int, 4)
         };
         parameters[0].Value = Id;
         using (dynamic read = DbHelperSQL.ExecuteReader(strSql.ToString(), parameters))
         {
             if (read.Read())
             {
                 model = new WebUserVeri();
                 try { model.Id = int.Parse(read["Id"].ToString()); }
                 catch { }
                 model.LoginName = read["LoginName"].ToString();
                 model.LoginPass = read["LoginPass"].ToString();
                 model.UserName  = read["UserName"].ToString();
                 model.UserTel   = read["UserTel"].ToString();
                 model.UserEmail = read["UserEmail"].ToString();
                 try { model.UserStatus = int.Parse(read["UserStatus"].ToString()); }
                 catch { }
                 try { model.LoginDate = DateTime.Parse(read["LoginDate"].ToString()); }
                 catch { }
                 try { model.LoginnNum = int.Parse(read["LoginnNum"].ToString()); }
                 catch { }
                 try { model.OutDate = DateTime.Parse(read["OutDate"].ToString()); }
                 catch { }
                 try { model.Veri = int.Parse(read["Veri"].ToString()); }
                 catch { }
                 try { model.MemberTypeId = int.Parse(read["MemberTypeId"].ToString()); }
                 catch { }
                 model.VeriName                = read["VeriName"].ToString();
                 model.VeriSex                 = read["VeriSex"].ToString();
                 model.VeriIDCard              = read["VeriIDCard"].ToString();
                 model.VeriIDCardScan          = read["VeriIDCardScan"].ToString();
                 model.OrgCode                 = read["OrgCode"].ToString();
                 model.VeriAddress             = read["VeriAddress"].ToString();
                 model.VeriTel                 = read["VeriTel"].ToString();
                 model.VeriCorporate           = read["VeriCorporate"].ToString();
                 model.VeriCorporateIDCard     = read["VeriCorporateIDCard"].ToString();
                 model.VeriCorporateIDCardScan = read["VeriCorporateIDCardScan"].ToString();
                 model.VeriCreditCode          = read["VeriCreditCode"].ToString();
                 model.VeriCreditCodeScan      = read["VeriCreditCodeScan"].ToString();
                 try { model.VeriStatus = int.Parse(read["VeriStatus"].ToString()); }
                 catch { }
                 try { model.AuditType = int.Parse(read["AuditType"].ToString()); }
                 catch { }
                 model.VeriCheckName = read["VeriCheckName"].ToString();
                 try { model.VeriApplyDate = DateTime.Parse(read["VeriApplyDate"].ToString()); }
                 catch { }
                 try { model.VeriCheckDate = DateTime.Parse(read["VeriCheckDate"].ToString()); }
                 catch { }
             }
             read.Dispose();
         }
         return(model);
     }
     catch { throw; }
 }
Example #12
0
        //
        private dynamic GetVeriUserModel(HttpContext context)
        {
            dynamic model = new WebUserVeri();

            try
            {
                try { model.Id = int.Parse(context.Request.Form["Id"].ToString()); }
                catch { }
                model.LoginName = context.Request.Form["LoginName"].ToString();
                model.LoginPass = context.Request.Form["LoginPass"].ToString();
                model.UserName  = context.Request.Form["UserName"].ToString();
                model.UserTel   = context.Request.Form["UserTel"].ToString();
                model.UserEmail = context.Request.Form["UserEmail"].ToString();
                try { model.UserStatus = int.Parse(context.Request.Form["UserStatus"].ToString()); }
                catch { }
                try { model.LoginDate = DateTime.Parse(context.Request.Form["LoginDate"].ToString()); }
                catch { }
                try { model.LoginnNum = int.Parse(context.Request.Form["LoginnNum"].ToString()); }
                catch { }
                try { model.OutDate = DateTime.Parse(context.Request.Form["OutDate"].ToString()); }
                catch { }
                try { model.Veri = int.Parse(context.Request.Form["Veri"].ToString()); }
                catch { }
                try { model.MemberTypeId = int.Parse(context.Request.Form["MemberTypeId"].ToString()); }
                catch { }
                model.VeriName   = context.Request.Form["VeriName"].ToString();
                model.VeriSex    = context.Request.Form["VeriSex"].ToString();
                model.VeriIDCard = context.Request.Form["VeriIDCard"].ToString();
                if (!string.IsNullOrEmpty(context.Request.Form["VeriIDCard"].ToString()))
                {
                    string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/us/" + model.LoginName + "/", 0);
                    if (!string.IsNullOrEmpty(ImgName))
                    {
                        string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/us/" + model.LoginName + "/" + ImgName);
                        string pdfUrl = "~/Super/Scan/us/" + model.LoginName + "/";
                        new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
                        model.VeriIDCardScan = ImgName.Split('.')[0] + ".pdf";
                    }
                    else
                    {
                        model.VeriIDCardScan = context.Request.Form["tVeriIDCardScan"].ToString();
                    }
                }
                model.OrgCode             = context.Request.Form["OrgCode"].ToString();
                model.VeriAddress         = context.Request.Form["VeriAddress"].ToString();
                model.VeriTel             = context.Request.Form["VeriTel"].ToString();
                model.VeriCorporate       = context.Request.Form["VeriCorporate"].ToString();
                model.VeriCorporateIDCard = context.Request.Form["VeriCorporateIDCard"].ToString();
                if (!string.IsNullOrEmpty(context.Request.Form["VeriCorporateIDCard"].ToString()))
                {
                    string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/us/" + model.LoginName + "/", 0);
                    if (!string.IsNullOrEmpty(ImgName))
                    {
                        string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/us/" + model.LoginName + "/" + ImgName);
                        string pdfUrl = "~/Super/Scan/us/" + model.LoginName + "/";
                        new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
                        model.VeriCorporateIDCardScan = ImgName.Split('.')[0] + ".pdf";
                    }
                    else
                    {
                        model.VeriCorporateIDCardScan = context.Request.Form["tVeriCorporateIDCardScan"].ToString();
                    }
                }
                model.VeriCreditCode = context.Request.Form["VeriCreditCode"].ToString();
                if (!string.IsNullOrEmpty(context.Request.Form["VeriCreditCode"].ToString()))
                {
                    string ImgName = new UpLoadImgPlug().UploadImg("~/Super/Scan/us/" + model.LoginName + "/", 0);
                    if (!string.IsNullOrEmpty(ImgName))
                    {
                        string imgUrl = HttpContext.Current.Server.MapPath("~/Super/Scan/us/" + model.LoginName + "/" + ImgName);
                        string pdfUrl = "~/Super/Scan/us/" + model.LoginName + "/";
                        new ProducePdfPlug().CreatePdf(imgUrl, pdfUrl, ImgName.Split('.')[0] + ".pdf");
                        model.VeriCreditCodeScan = ImgName.Split('.')[0] + ".pdf";
                    }
                    else
                    {
                        model.VeriCreditCodeScan = context.Request.Form["tVeriCreditCodeScan"].ToString();
                    }
                }
                try { model.VeriStatus = int.Parse(context.Request.Form["VeriStatus"].ToString()); }
                catch { }
                try { model.AuditType = int.Parse(context.Request.Form["AuditType"].ToString()); }
                catch { }
                model.VeriCheckName = context.Request.Form["VeriCheckName"].ToString();
                try { model.VeriApplyDate = DateTime.Parse(context.Request.Form["VeriApplyDate"].ToString()); }
                catch { }
                try { model.VeriCheckDate = DateTime.Parse(context.Request.Form["VeriCheckDate"].ToString()); }
                catch { }
                return(model);
            }
            catch (Exception ex)
            {
                SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
                return(model);
            }
        }
Example #13
0
 //
 private dynamic UserLogin(HttpContext context)
 {
     try
     {
         string      LoginName = context.Request.Form["LoginName"] as string;
         string      LoginPass = context.Request.Form["LoginPass"] as string;
         string      CheckImg  = context.Request.Form["CheckImg"] as string;
         string      CheckCode = context.Session["CheckCode"] as string;
         WebUserVeri user      = webUserDal.UserLogin(LoginName, LoginPass);
         if (CheckImg.ToUpper().Equals(CheckCode.ToUpper()))
         {
             if (webUserDal.CheckUserName(LoginName))
             {
                 if (!string.IsNullOrEmpty(user.LoginPass))
                 {
                     if (user.Veri == 0)
                     {
                         if (0 != user.UserStatus)
                         {
                             context.Session.Add("UserSession", user);
                             webUserDal.NumberLogin(user.Id);
                             SysLogBll.Create("注册用户登录", "登陆成功", user.UserName != "" ? user.UserName : user.VeriName);
                             AddCookie(context, user.Id.ToString());
                             return("Y");
                         }
                         else
                         {
                             SysLogBll.Create("注册用户登录", "账户禁用", user.UserName != "" ? user.UserName : user.VeriName);
                             return("账户已经被禁用!");
                         }
                     }
                     else
                     {
                         if (0 != user.VeriStatus)
                         {
                             context.Session.Add("UserSession", user);
                             webUserDal.NumberLogin(user.Id);
                             SysLogBll.Create("注册用户登录", "登陆成功", user.UserName != "" ? user.UserName : user.VeriName);
                             AddCookie(context, user.Id.ToString());
                             return("Y");
                         }
                         else
                         {
                             SysLogBll.Create("注册用户登录", "账户禁用", user.UserName != "" ? user.UserName : user.VeriName);
                             return("账户已经被禁用!");
                         }
                     }
                 }
                 else
                 {
                     SysLogBll.Create("注册用户登录", "密码错误", user.UserName != "" ? user.UserName : user.VeriName);
                     return("密码不正确请重新输入密码!");
                 }
             }
             else
             {
                 SysLogBll.Create("注册用户登录", "用户名错误", user.UserName != "" ? user.UserName : user.VeriName);
                 return("用户名不存在!");
             }
         }
         else
         {
             SysLogBll.Create("注册用户登录", "验证码错误", user.UserName != "" ? user.UserName : user.VeriName);
             return("验证码错误请重新输入!");
         }
     }
     catch (Exception ex)
     {
         SystemErrorPlug.ErrorRecord("时间:[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "]类名:[" + this.GetType().Name + "],行号:[" + Component.GetLineNum().ToString() + "行],错误信息:[" + ex.Message + "]");
         return("系统异常错误代码:500 " + ex.Message);
     }
 }