private void ApiAuthenticate_Load(object sender, EventArgs e) { synth.SpeakAsync("Hello"); synth.SpeakAsync("Please say your emailId"); LblInvaliduser.Visible = false; Msg.Visible = false; Loader.Visible = false; SpeechRecognitionWithDictationGrammar(); UserBusinessModel businesslayer = new UserBusinessModel(); List <User> ListUser = businesslayer.GetUsers(); listEmails = ListUser.Select(x => x.EmailID.ToLower()).ToList(); }
private void VerifyUserandMovetoSubject(SpeechRecognizedEventArgs e) { UserBusinessModel businesslayer = new UserBusinessModel(); List <User> ListUser = businesslayer.GetUsers(); listEmails = ListUser.Select(x => x.EmailID.ToLower()).ToList(); foreach (var listEmail in listEmails) { if (e.Result.Text.Contains(listEmail)) { txtEmail.Text = listEmail; synth.Speak("Ok Please say the subject for the mail"); txtSubject.Focus(); } } }
private IEnumerable <User> GetAllUser(bool Isadmin) { UserBusinessModel businesslayer = new UserBusinessModel(); List <User> listUser = businesslayer.GetUsers(); var SingleUser = listUser.Where(U => U.EmailID == LoginCredentials.LoggedEmailId); var AlUser = listUser; if (!Isadmin) { return(SingleUser.ToList()); } else { return(AlUser.ToList()); } }
public static bool IsValidUser(string Username, string password) { if (adminUser(Username, password)) { return(true); } else { UserBusinessModel UserModel = new UserBusinessModel(); List <User> listUsers = UserModel.GetUsers(); foreach (var user in listUsers) { if (user.EmailID == Username) { if (user.Password == password) { return(true); } } } } return(false); }
public List <Users> GetUsers() { UserBusinessModel UserBusinessModel = new UserBusinessModel(); return(UserBusinessModel.GetUsers()); }