public MasterFormEmployee(string currUser) { InitializeComponent(); this.currUser = currUser; //populate events with hard coded values eventsAvail.Add(new Event("Whale Watch", "12/12/2013", "3:00 pm", "Missoula Aquarium", 1)); eventsAvail.Add(new Event("Open Discussion", "12/15/2013", "6:00 pm", "University of Montana", 2)); eventsAvail.Add(new Event("Seal Play-time", "12/17/2013", "1:00 pm", "Missoula Aquarium", 3)); eventsAvail.Add(new Event("Pot Luck Dinner", "12/20/2013", "5:00 pm", "Caras Park", 4)); addToListBoxAvailEvents(); //populte employees with hard coded values int userNum = int.Parse(currUser); int diff = 0;// userNum - 79002; Employee current = new Employee("John Lee", userNum, "Associate"); employees.Add(current); Employee current2 = new Employee("Mary Jane", userNum - diff + 1, "Associate"); employees.Add(current2); Employee current3 = new Employee("Fred Savage", userNum - diff + 2, "Manager"); employees.Add(current3); Employee current4 = new Employee("Todd Regal", userNum - diff + 3, "Gift Shop Clerk"); employees.Add(current4); //print to console for reference and debug foreach (Employee e in employees) { Console.WriteLine(e); } //add employees to schedule in sloppy manner ;) Shift currentEmpSch = new Shift(current, "Off", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "Off"); ListViewItem item = new ListViewItem(new[] { "" + currentEmpSch.emp.empID, currentEmpSch.emp.empName, currentEmpSch.mon, currentEmpSch.tue, currentEmpSch.wed, currentEmpSch.thu, currentEmpSch.fri, currentEmpSch.sat, currentEmpSch.sun }); scheduleListBox.Items.Add(item); currentEmpSch = new Shift(current2, "9:00 am-5:00 pm", "Off", "Off", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm"); item = new ListViewItem(new[] { "" + currentEmpSch.emp.empID, currentEmpSch.emp.empName, currentEmpSch.mon, currentEmpSch.tue, currentEmpSch.wed, currentEmpSch.thu, currentEmpSch.fri, currentEmpSch.sat, currentEmpSch.sun }); scheduleListBox.Items.Add(item); currentEmpSch = new Shift(current3, "Off", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "Off"); item = new ListViewItem(new[] { "" + currentEmpSch.emp.empID, currentEmpSch.emp.empName, currentEmpSch.mon, currentEmpSch.tue, currentEmpSch.wed, currentEmpSch.thu, currentEmpSch.fri, currentEmpSch.sat, currentEmpSch.sun }); scheduleListBox.Items.Add(item); currentEmpSch = new Shift(current4, "9:00 am-5:00 pm", "9:00 am-5:00 pm", "9:00 am-5:00 pm", "Off", "Off", "9:00 am-5:00 pm", "9:00 am-5:00 pm"); item = new ListViewItem(new[] { "" + currentEmpSch.emp.empID, currentEmpSch.emp.empName, currentEmpSch.mon, currentEmpSch.tue, currentEmpSch.wed, currentEmpSch.thu, currentEmpSch.fri, currentEmpSch.sat, currentEmpSch.sun }); scheduleListBox.Items.Add(item); ///add tours /// tourAvail.Add(new Tour("Seal Safari", 1, "Bill Johnson", "12/20/2013 8:00 am", "Missoula Aquarium")); tourAvail.Add(new Tour("Morning Glory", 2, "Ace Boomer", "12/21/2013 8:00 am", "Missoula Aquarium")); tourAvail.Add(new Tour("Night Owl", 3, "Linda Weston", "12/22/2013 10:00 pm", "Caras Park")); tourAvail.Add(new Tour("Shark Scamper", 4, "Sara Jones", "12/23/2013 11:00 am", "Missoula Aquarium")); addToAvailToursListBox(); }
public Shift(Employee e, string su, string m, string t, string w, string r, string f, string s) { emp = e; name = emp.empName; id = emp.empID; sun = su; mon = m; tue = t; wed = w; thu = r; fri = f; sat = s; }