/// <summary> /// 注册会员 /// </summary> /// <param name="mobile">手机</param> /// <param name="email">邮箱</param> /// <param name="loginpwd">登录密码</param> /// <param name="usertype">类型</param> /// <param name="operateIP">操作IP</param> /// <param name="operateID">操作ID</param> /// <param name="result">返回状态 1成功 0不成功</param> /// <param name="resultdes">返回字符串</param> /// <returns></returns> public static string AddUsers(string mobile, string email, string loginpwd, UserType usertype, string operateIP, string operateID, out int result, out string resultdes) { loginpwd = DESEncrypt.GetEncryptionPwd(loginpwd); object obj = new UserDAL().AddUsers(mobile, email, loginpwd, (int)usertype, operateIP, operateID, out result, out resultdes); if (obj != null && obj != DBNull.Value) { return obj.ToString(); } return string.Empty; }
/// <summary> /// /// </summary> /// <param name="name">姓名</param> /// <param name="mobile">手机</param> /// <param name="email">邮箱</param> /// <param name="loginpwd">密码</param> /// <param name="photoPath">照片</param> /// <param name="usertype">类型</param> /// <param name="keyWords">职称</param> /// <param name="desc">描述</param> /// <param name="operateIP">操作IP</param> /// <param name="operateID">操作ID</param> /// <param name="result">返回状态 1成功 0不成功</param> /// <param name="resultdes">返回字符串</param> /// <returns></returns> public static string AddUsers(string name, string mobile, string email, string loginpwd, string photoPath, UserType usertype, string keyWords, string desc, string operateIP, string operateID,out int result,out string resultdes) { loginpwd = DESEncrypt.GetEncryptionPwd(loginpwd); if (!string.IsNullOrEmpty(photoPath) && photoPath != "/modules/images/default.png") { if (photoPath.IndexOf("?") > 0) { photoPath = photoPath.Substring(0, photoPath.IndexOf("?")); } FileInfo file = new FileInfo(HttpContext.Current.Server.MapPath(photoPath)); photoPath = "/Content/upload_images/" + file.Name; file.MoveTo(HttpContext.Current.Server.MapPath(photoPath)); } object obj = new UserDAL().AddUsers(name, mobile, email, loginpwd, photoPath, (int)usertype, keyWords, desc, operateIP, operateID,out result,out resultdes); if (obj != null && obj != DBNull.Value) { return obj.ToString(); } return string.Empty; }