示例#1
0
        public static bool IsFullAdmin(string emplIDNumber)
        {
            EmployeeClassesDataContext theObject = new EmployeeClassesDataContext();

            var query = theObject.GetTable <Employee>().Where(emp => emp.EmpID == emplIDNumber).First();

            if (query.Rank == 5)
            {
                return(true);
            }
            return(false);
        }
示例#2
0
        public static string Login(string emplIDNumber, string emplPassword)
        {
            EmployeeClassesDataContext theObject = new EmployeeClassesDataContext();
            var query = theObject.GetTable <Employee>().Where(emp => emp.EmpID == emplIDNumber && emp.EmpPass == emplPassword).FirstOrDefault();

            if (query != null)
            {
                return("Successfully!");
            }
            else
            {
                return("Incorrect information!");
            }
        }