示例#1
0
        //A
        public static void viewStaff(string id)
        {
            string query = @"SELECT * FROM Staff WHERE Staff_ID = @ID;";


            //connect to database
            DBConnection connection = DBConnection.getDBConnectionInstance();
            DataSet      staffData  = connection.getDataById(query, id);
            int          count      = staffData.Tables[0].Rows.Count;

            //makes sure exactly one result was found
            if (count == 1)
            {
                staff_individual staff = new staff_individual(id, staffData);
                staff.Show();
            }
            else
            {
                MessageBox.Show("No staff member found.");
            }
        }
示例#2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.staff_details = ((WpfApp2.staff_individual)(target));
                return;

            case 2:
                this.staff_shift_week = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.lb_staff_id = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.lb_staff_name = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.tb_staff_name = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.lb_address = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.tb_address = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.tb_contact_details = ((System.Windows.Controls.TextBox)(target));
                return;

            case 9:
                this.lb_contact_details = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.lb_dob = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.tb_dob = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:
                this.lb_role = ((System.Windows.Controls.Label)(target));
                return;

            case 13:
                this.tb_role = ((System.Windows.Controls.TextBox)(target));
                return;

            case 14:
                this.tb_staff_id = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.dataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 16:
                this.bookingsGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 17:
                this.textBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 18:
                this.bt_new_shift = ((System.Windows.Controls.Button)(target));

            #line 26 "..\..\staff_individual.xaml"
                this.bt_new_shift.Click += new System.Windows.RoutedEventHandler(this.bt_new_shift_Click);

            #line default
            #line hidden
                return;

            case 19:
                this.dp1 = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 20:
                this.bt_search_dp = ((System.Windows.Controls.Button)(target));

            #line 28 "..\..\staff_individual.xaml"
                this.bt_search_dp.Click += new System.Windows.RoutedEventHandler(this.bt_search_dp_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
示例#3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.staff_details = ((WpfApp2.staff_individual)(target));
                return;

            case 2:
                this.bt_bookings = ((System.Windows.Controls.Button)(target));

            #line 10 "..\..\staff_individual.xaml"
                this.bt_bookings.Click += new System.Windows.RoutedEventHandler(this.btn_ookings_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.bt_patients = ((System.Windows.Controls.Button)(target));

            #line 11 "..\..\staff_individual.xaml"
                this.bt_patients.Click += new System.Windows.RoutedEventHandler(this.bt_patients_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.bt_home = ((System.Windows.Controls.Button)(target));

            #line 12 "..\..\staff_individual.xaml"
                this.bt_home.Click += new System.Windows.RoutedEventHandler(this.bt_home_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.staff_calendar = ((System.Windows.Controls.Calendar)(target));
                return;

            case 6:

            #line 14 "..\..\staff_individual.xaml"
                ((System.Windows.Controls.ListView)(target)).SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ListView_SelectionChanged);

            #line default
            #line hidden
                return;

            case 7:
                this.date_shift = ((System.Windows.Controls.ListBoxItem)(target));

            #line 20 "..\..\staff_individual.xaml"
                this.date_shift.Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected);

            #line default
            #line hidden
                return;

            case 8:
                this.shift_list_scroller = ((System.Windows.Controls.Primitives.ScrollBar)(target));
                return;

            case 9:
                this.staff_shift_week = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.staff_details_box = ((System.Windows.Controls.TextBox)(target));

            #line 24 "..\..\staff_individual.xaml"
                this.staff_details_box.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_TextChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }