Beispiel #1
0
 public DialogVetoReset(BO.Account account)
 {
     InitializeComponent();
     I18N();
     CheckTextBox();
     this.account = account;
 }
Beispiel #2
0
        /// <summary>
        /// Connecte un utilisateur
        /// </summary>
        /// <param name="username"></param>
        /// <param name="passwordNotHash"></param>
        /// <returns></returns>
        public static bool Login(String username, String passwordNotHash)
        {
            String hashPassword = BO.Account.getSHA1Password(username, passwordNotHash);

            loggedAccount = DAL.Account.Login(username, hashPassword);

            return(loggedAccount != null);
        }
Beispiel #3
0
        /// <summary>
        /// Met a jour le compte passé en paramètre
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        public static bool Update(BO.Account account)
        {
            if (!isLogin(account.Id))
            {
                throw new Exception(Lang.ACCOUNT_NOT_EXIST);
            }

            return(DAL.Account.Update(account));
        }
Beispiel #4
0
 /// <summary>
 /// Création d'un compte
 /// Retourne le même compte avec son id en base de donnée
 /// </summary>
 /// <param name="account"></param>
 /// <returns></returns>
 public static BO.Account Create(BO.Account account)
 {
     DAL.Account.Create(account);
     return(DAL.Account.Get(account.Username));
 }