private static void fillUserInfo(SqlDataReader reader, UserInfo userInfo) { userInfo.Name = (string)reader["Name"]; userInfo.NickName = (string)reader["NickName"]; userInfo.Password = (string)reader["Password"]; userInfo.Homepage = (string)reader["Homepage"]; userInfo.Level = (LevelAttribute)Enum.Parse( typeof(LevelAttribute), (string)reader["Level"]); }
public void Add(UserInfo userInfo) { items.Add( userInfo ); }
/// <summary> /// ����� ������ �����Ѵ�. /// </summary> /// <param name="userInfo"></param> public static void UpdateUserInfo(string email, UserInfo userInfo) { SqlParameter[] param = { CreateInParam("@OldEmail", SqlDbType.VarChar,20, email), CreateInParam("@NewEmail", SqlDbType.VarChar,255, userInfo.EMail), CreateInParam("@Name", SqlDbType.VarChar,20, userInfo.Name), CreateInParam("@NickName",SqlDbType.VarChar,20, userInfo.NickName), CreateInParam("@HomePage", SqlDbType.VarChar,255, userInfo.Homepage), CreateInParam("@Level", SqlDbType.VarChar,20, userInfo.Level.ToString()) }; SqlCommand cmd = GetSpCommand("UBU_UpdateUserInfo",param); cmd.ExecuteNonQuery(); ReleaseCommand(cmd); }
/// <summary> /// ȸ�� ���� /// </summary> /// <param name="userInfo"></param> /// <returns></returns> public static string InsertUser(UserInfo userInfo) { SqlParameter[] param = { CreateInParam("@EMail", SqlDbType.VarChar, 20, userInfo.EMail ), CreateInParam("@Name", SqlDbType.VarChar,20, userInfo.Name ), CreateInParam("@NickName",SqlDbType.VarChar,20, userInfo.NickName ), CreateInParam("@Password",SqlDbType.VarChar,100, userInfo.Password ), CreateInParam("@Homepage",SqlDbType.VarChar,255, userInfo.Homepage ), CreateInParam("@Level", SqlDbType.VarChar,20, userInfo.Level.ToString() ), CreateOutParam("@ReturnCode", SqlDbType.VarChar,100) }; SqlCommand cmd = GetSpCommand("UUI_InsertUser", param, IsolationLevel.ReadUncommitted); try { cmd.ExecuteNonQuery(); ReleaseCommandWithCommit(cmd); return (string)cmd.Parameters["@ReturnCode"].Value; } catch { ReleaseCommandWithRollback(cmd); return AuthenticateConst.MESSAGE_JOIN_FAIL; } }
/// <summary> /// ���������� �����Ѵ�. /// </summary> /// <param name="email"></param> /// <param name="userInfo"></param> public void UpdateUserInfo(string email, UserInfo userInfo) { AuthenticateAccess.UpdateUserInfo( email, userInfo ); }
/// <summary> /// ������ �α��� ��Ų��. /// </summary> /// <param name="userInfo"></param> /// <param name="context"></param> public void Login(UserInfo userInfo, HttpContext context) { context.Session[AuthenticateConst.SESSION_USERINFO] = userInfo; }
/// <summary> /// ȸ�� ���� /// </summary> /// <param name="userInfo"></param> /// <returns></returns> public string InsertUser(UserInfo userInfo) { return AuthenticateAccess.InsertUser( userInfo ); }