コード例 #1
0
ファイル: Staff.xaml.cs プロジェクト: Zainabalhaidary/Clinic
        public void fillDragMenuGridView2()
        {
            //List<WorkHours> whList = new List<WorkHours>();
            siList2 = new List<StaffItem>();
            //WorkHours wh = new WorkHours() { From = new DateTime(0001, 01, 01) + new TimeSpan(7, 0, 0), To = new DateTime(0001, 01, 01) + new TimeSpan(15, 0, 0) };
            //StaffItem si = new StaffItem() { workHours = wh, Color = "#99FF99" };
            //siList2.Add(si);
            //WorkHours wh2 = new WorkHours() { From = new DateTime(0001, 01, 01) + new TimeSpan(15, 0, 0), To = new DateTime(0001, 01, 01) + new TimeSpan(23, 0, 0) };
            //StaffItem si1 = new StaffItem() { workHours = wh2, Color = "#99CCFF" };
            //siList2.Add(si1);
            //WorkHours wh3 = new WorkHours() { From = new DateTime(0001, 01, 01) + new TimeSpan(23, 0, 0), To = new DateTime(0001, 01, 01) + new TimeSpan(7, 0, 0) };
            //StaffItem si2 = new StaffItem() { workHours = wh3, Color = "Wheat" };
            WorkHours wh = new WorkHours() { TimeOffReason = "Time Off" };
            StaffItem si = new StaffItem() { workHours = wh };
            siList2.Add(si);
            wh = new WorkHours() { TimeOffReason = "Vacation" };
            si = new StaffItem() { workHours = wh };
            siList2.Add(si);
            wh = new WorkHours() { TimeOffReason = "Business Related" };
            si = new StaffItem() { workHours = wh };
            siList2.Add(si);
            wh = new WorkHours() { TimeOffReason = "Sick Leave" };
            si = new StaffItem() { workHours = wh };
            siList2.Add(si);
            wh = new WorkHours() { TimeOffReason = "Family Emergency" };
            si = new StaffItem() { workHours = wh };
            siList2.Add(si);
            wh = new WorkHours() { TimeOffReason = "Absent" };
            si = new StaffItem() { workHours = wh };
            siList2.Add(si);


            DragMenuGridView2.ItemsSource = siList2;
        }
コード例 #2
0
ファイル: Staff.xaml.cs プロジェクト: Zainabalhaidary/Clinic
 public void fillDragMenuGridView()
 {
     //List<WorkHours> whList = new List<WorkHours>();
     siList = new List<StaffItem>();
     WorkHours wh = new WorkHours() { From = new DateTime(0001, 01, 01) + new TimeSpan(7, 0, 0), To = new DateTime(0001, 01, 01) + new TimeSpan(15, 0, 0) };
     StaffItem si = new StaffItem() { workHours = wh, Color = "#99FF99" };
     siList.Add(si);
     WorkHours wh2 = new WorkHours() { From = new DateTime(0001, 01, 01) + new TimeSpan(15, 0, 0), To = new DateTime(0001, 01, 01) + new TimeSpan(23, 0, 0) };
     StaffItem si1 = new StaffItem() { workHours = wh2, Color = "#99CCFF" };
     siList.Add(si1);
     WorkHours wh3 = new WorkHours() { From = new DateTime(0001, 01, 01) + new TimeSpan(23, 0, 0), To = new DateTime(0001, 01, 01) + new TimeSpan(7, 0, 0) };
     StaffItem si2 = new StaffItem() { workHours = wh3, Color = "Wheat" };
     siList.Add(si2);
     DragMenuGridView.ItemsSource = siList;
 }