private static void RunUserInput(string input) { Customer customer; UserEmployee employee; Admin admin; Console.Clear(); switch (input.ToLower()) { case "customer": case "2": customer = new Customer(); customer.LogIn(); break; case "employee": case "1": employee = new UserEmployee(); employee.LogIn(); break; case "admin**": admin = new Admin(); admin.LogIn(); break; default: UserInterface.DisplayUserOptions("Input not recognized please try again."); Run(); break; } }
//// TODO Items: //// // TODO: Allow any of the CRUD operations to occur here internal static void RunEmployeeQueries(Employee employee, string crudOperation) { Console.WriteLine("What would you like to do?\n1)Create new Employee\n2)Retrieve existing employee\n3)Update employee\n4)Delete employee"); int input = Convert.ToInt32(Console.ReadLine()); switch (input) { case 1: UserEmployee userEmployee = new UserEmployee(); userEmployee.CreateNewEmployee(); break; case 2: RetrieveEmployeeUser(); break; case 3: UserEmployee userEmployee1 = new UserEmployee(); userEmployee1.UpdateEmployeeInfo(); break; case 4: RemoveEmployee(employee); break; default: UserInterface.DisplayUserOptions("Input not accepted please try again"); break; } }
//Kieran internal static void RemoveAnimal(Animal animal) { UserEmployee test = new UserEmployee(); test.RemoveAnimal(); throw new NotImplementedException(); }
//Isaac internal static Animal GetAnimalByID(int id) { UserEmployee test = new UserEmployee(); var foundAnimal = test.SearchForAnimal(id); throw new NotImplementedException(); }
static void Main(string[] args) { UserEmployee ue = new UserEmployee(); //ue.UpdateAnimal(); //uie.UpdateAnimal(); PointOfEntry.Run(); }
internal static void UpdateAnimal(int animalId, Dictionary <int, string> updates) { UserEmployee userEmployee = new UserEmployee(); int input = UserInterface.GetIntegerData(); if (input == 1) { ChangeCategory(animal); userEmployee.UpdateAnimal(animal); } else if (input == 2) { ChangeName(animal); userEmployee.UpdateAnimal(animal); } else if (input == 3) { ChangeAge(animal); userEmployee.UpdateAnimal(animal); } else if (input == 4) { ChangeDemeanor(animal); userEmployee.UpdateAnimal(animal); } else if (input == 5) { CheckKidFriendly(animal); userEmployee.UpdateAnimal(animal); } else if (input == 6) { CheckPetFriendly(animal); userEmployee.UpdateAnimal(animal); } else if (input == 7) { ChangeWeight(animal); userEmployee.UpdateAnimal(animal); } else if (input == 8) { ChangeID(input == 8); userEmployee.UpdateAnimal(animal); } else if (input == 9) { } }
static void Main(string[] args) { UserEmployee ue = new UserEmployee(); PointOfEntry.Run(); }