示例#1
0
        // 建立一管理者
        public void Create(string AdminAccount, string Password, string NickName)
        {
            t_Admin ta = new t_Admin();

            ta.AdminAccount  = AdminAccount;
            ta.Password      = HashPassword(Password);
            ta.NickName      = NickName;
            ta.LastLoginTime = null;
            ta.UpdateTime    = DateTime.Now;
            cae.t_Admin.Add(ta);
        }
示例#2
0
        // 更新密碼
        public void UpdatePassword(string AdminAccount, string Password)
        {
            t_Admin tm = cae.t_Admin.FirstOrDefault(m => m.AdminAccount == AdminAccount);

            tm.Password = HashPassword(Password);
        }