예제 #1
0
 // This method is used inside the Login.xaml.cs
 // We loop through the whole emp list to check if the credentials match.
 //The set the global emp as the emp who is logged in.
 // The method returns false if there is no emp with the given credentials
 public static bool ValidateAccountCredentials(string username, string password)
 {
     foreach (var emp in Instance.GetEmployeeList())
     {
         if (emp.Username.Equals(username) && emp.Password.Equals(password))
         {
             singleEmp.SetEmployee(emp);
             return(true);
         }
     }
     return(false);
 }
        public async Task LoadDataAsync(MasterDetailsViewState viewState)
        {
            EmployeesSample.Clear();


            foreach (var emp in Instance.GetEmployeeList())
            {
                EmployeesSample.Add(emp);
            }

            if (viewState == MasterDetailsViewState.Both)
            {
                Selected = EmployeesSample.First();
            }
        }