public bool RegisterAdminAccount(UserMv user) { var data = new WikiService.TaiKhoan(); data.TenTaiKhoan = user.UserName; data.Email = user.Email; data.MatKhau = Encryptor.MD5Hash(Encryptor.Base64Hash(user.Email) + Encryptor.Base64Hash(user.Password)); var result = cl.DangKiTaiKhoanAdmin(data); return(result); }
public bool RegisterClientAccount(UserMv user) { var data = new WikiService.TaiKhoan() { TenTaiKhoan = user.UserName, Email = user.Email, MatKhau = Encryptor.MD5Hash(Encryptor.Base64Hash(user.Email) + Encryptor.Base64Hash(user.Password) ) }; var result = cl.DangKiTaiKhoanUser(data); return(result); }
//checkRole public UserMv CheckRoleUserById(int id) { var data = new WikiService.TaiKhoan(); data.MaTaiKhoan = id; var user = new UserMv(); var result = cl.KiemTraTaiKhoan(data); user.ID = result.MaTaiKhoan; user.UserName = result.TenTaiKhoan; user.active = result.TrangThai; user.idR = result.IDRole; return(user); }