Esempio n. 1
0
        public static ViewModel getView(int?id)
        {
            ViewModel vm = new ViewModel();

            vm.Contact = RunnersDB.getContact(id);
            vm.Runners = RunnersDB.getRunners(id);
            return(vm);
        }
Esempio n. 2
0
        public static RegModel getRegView()
        {
            RegModel vm = new RegModel();

            vm.Contact           = new Contacts();
            vm.Contact.Id        = RunnersDB.getLastContactId();
            vm.Contact.FirstName = "Tim";
            vm.Contact.LastName  = "Kelly";
            vm.Contact.phone     = "801-719-4380";
            vm.Contact.email     = "*****@*****.**";
            vm.confirmEmail      = "*****@*****.**";
            var tenRunners = new List <Runners>();

            for (int dex = 0; dex < 10; dex++)
            {
                var runner = new Runners();
                runner.contactID = vm.Contact.Id;
                tenRunners.Add(runner);
            }
            vm.Runners = tenRunners;
            return(vm);
        }
Esempio n. 3
0
 public static List <Contacts> getAllContacts()
 {
     return(RunnersDB.getAllContacts());
 }
Esempio n. 4
0
 public static void addRunner(Runners runner)
 {
     RunnersDB.addRunner(runner);
 }
Esempio n. 5
0
 public static void addContact(Contacts contact)
 {
     RunnersDB.addContact(contact);
 }
Esempio n. 6
0
 public static List <Runners> getAllRunners()
 {
     return(RunnersDB.getAllRunners());
 }