コード例 #1
0
        public int Usp_User_Register(UserEntity user)
        {
            try
            {
                using (AppBLL bll = new AppBLL())
                {
                    DataTable table = bll.FillDataTable("Usp_User_GetByMobile", new { C_Mobile = user.C_Mobile });
                    /// 手机号码已经注册
                    if (table.Rows.Count > 0)
                    {
                        return(-2);
                    }

                    user.I_Flag     = 1;
                    user.D_Create   = DateTime.Now;
                    user.C_Login    = user.C_Mobile;
                    user.C_Password = SHA256(user.C_Password);
                    WriteLog("用户注册", user);
                    return(bll.ExecuteNonQuery("Usp_User_Insert", user));
                }
            }
            catch (Exception ex)
            {
                return(-1);
            }
        }
コード例 #2
0
 public static string mf_getTable()
 {
     using (AppBLL bll = new AppBLL())
     {
         int       tempStr = 1;
         DataTable table   = bll.FillDataTable("p_getTableName", null);
         if (table.Rows.Count > 0)
         {
             tempStr = int.Parse(table.Rows[0][0].ToString()) + 1;
         }
         return(string.Format("s_tb_TempScore{0}", tempStr));
     }
 }
コード例 #3
0
        public int Usp_User_Register(UserEntity user)
        {
            try
            {
                using (AppBLL bll = new AppBLL())
                {
                    DataTable table = bll.FillDataTable("Usp_User_GetByMobile", new { C_Mobile = user.C_Mobile });
                    /// 手机号码已经注册
                    if (table.Rows.Count > 0) return -2;

                    user.I_Flag = 1;
                    user.D_Create = DateTime.Now;
                    user.C_Login = user.C_Mobile;
                    user.C_Password = SHA256(user.C_Password);
                    WriteLog("用户注册", user);
                    return bll.ExecuteNonQuery("Usp_User_Insert", user);
                }
            }
            catch (Exception ex)
            {
                return -1;
            }
        }