public void DataBinding()
        {
            children = DbOperations.GetChildrenOfGuardian();

            comboBoxChildren.ItemsSource       = children;
            comboBoxChildren.DisplayMemberPath = "Fullinformation";
        }
示例#2
0
        public LoggedInGuardian()
        {
            InitializeComponent();

            children = DbOperations.GetChildrenOfGuardian();

            listViewGuardianChild.Items.Clear();
            listViewGuardianChild.ItemsSource       = children;
            listViewGuardianChild.DisplayMemberPath = "Fullinformation";
        }
        public void DataBinding()
        {
            //Hämta barn
            children = DbOperations.GetChildrenOfGuardian();

            comboBoxChildren.ItemsSource       = children;
            comboBoxChildren.DisplayMemberPath = "Fullinformation";

            comboBoxChildren.SelectedIndex = 0;

            //Hämta barn se
            children = DbOperations.GetChildrenOfGuardian();

            comboBoxChildren2.ItemsSource       = children;
            comboBoxChildren2.DisplayMemberPath = "Fullinformation";

            comboBoxChildren2.SelectedIndex = 0;

            //Hämta frånvaro typer
            attendancecategories = DbOperations.GetAttendances();

            comboBoxAbscence.ItemsSource       = attendancecategories;
            comboBoxAbscence.DisplayMemberPath = "Fullinformation";

            comboBoxAbscence.SelectedIndex = 0;

            //Hämta veckor
            weeks = DbOperations.GetWeek();

            comboBoxWeek.ItemsSource       = weeks;
            comboBoxWeek.DisplayMemberPath = "InformationWeek";

            //Hämta dagar
            Weeks week = new Weeks();

            week.Week = 1;
            dates     = DbOperations.GetDays(week);
            comboBoxDay.ItemsSource       = dates;
            comboBoxDay.DisplayMemberPath = "InformationDay";

            Activechild.Setactivechild((Child)comboBoxChildren.SelectedItem);
        }
        public void DataBinding()
        {
            //Hämta barn
            children = DbOperations.GetChildrenOfGuardian();

            comboBoxChildren.ItemsSource       = children;
            comboBoxChildren.DisplayMemberPath = "Fullinformation";
            comboBoxChildren.SelectedIndex     = 0;

            comboBoxChildMeals.ItemsSource       = children;
            comboBoxChildMeals.DisplayMemberPath = "Fullinformation";
            comboBoxChildMeals.SelectedIndex     = 0;

            comboBoxChildren2.ItemsSource       = children;
            comboBoxChildren2.DisplayMemberPath = "Fullinformation";
            comboBoxChildren2.SelectedIndex     = 0;

            //Hämta veckor
            weeks = DbOperations.GetWeek();

            comboBoxWeek.ItemsSource       = weeks;
            comboBoxWeek.DisplayMemberPath = "InformationWeek";

            //Hämta dagar
            Weeks week = new Weeks();

            week.Week = 1;
            dates     = DbOperations.GetDays(week);

            comboBoxDay.ItemsSource       = dates;
            comboBoxDay.DisplayMemberPath = "InformationDay";


            //Hämta Morgon/Kväll
            attendancecategories = DbOperations.GetFritidsMorningEvening();

            comboBoxType.ItemsSource       = attendancecategories;
            comboBoxType.DisplayMemberPath = "Fullinformation";
        }