コード例 #1
0
        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();
        }
コード例 #2
0
        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();
                }
            }
        }
コード例 #3
0
        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());
            }
        }
コード例 #4
0
ファイル: UserPrivilege.cs プロジェクト: ramjinrajin/Vmail
        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);
        }
コード例 #5
0
        public List <Users> GetUsers()
        {
            UserBusinessModel UserBusinessModel = new UserBusinessModel();

            return(UserBusinessModel.GetUsers());
        }