Interaction logic for AgencyProfile.xaml TODO - Adjust Database, Types of servie bits are allowing nulls
Наследование: System.Windows.Window
Пример #1
0
        private void newAgencyProfile_BTN_Click(object sender, RoutedEventArgs e)
        {
            AgencyProfile Agencyform = new AgencyProfile(IsAdmin);

            Agencyform.Closed += new EventHandler((s0, e0) => agencySearch_BTN_Click(s0, null));
            Agencyform.Show();
        }
Пример #2
0
        private void Edit_agency_MenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (dbMethods.CheckDatabaseConnection())
            {
                using (PubsDataContext db = new PubsDataContext())
                {
                    Agency agentRow = agencySearch_DataGrid.SelectedItem as Agency;
                    Agency stud     = (from a in db.Agencies
                                       where a.Name == agentRow.Name
                                       select a).Single();

                    AgencyProfile agentForm = new AgencyProfile(stud, IsAdmin, true);
                    agentForm.Show();
                }
            }
        }
Пример #3
0
        private void AgencySearch_DataGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            using (PubsDataContext datab = new PubsDataContext())
            {
                Agency agencyRow = agencySearch_DataGrid.SelectedItem as Agency;
                if (agencyRow != null)
                {
                    Agency agent = (from s in datab.Agencies
                                    where s.Name == agencyRow.Name
                                    select s).Single();

                    AgencyProfile agentForm = new AgencyProfile(agent, IsAdmin, true);
                    agentForm.Closed += new EventHandler((s0, e0) => agencySearch_BTN_Click(s0, null));
                    agentForm.Show();
                }
            }
        }
Пример #4
0
        private void menuCreateAgency_Click(object sender, RoutedEventArgs e)
        {
            AgencyProfile Agencyform = new AgencyProfile(IsAdmin);

            Agencyform.Show();
        }
Пример #5
0
 private void newAgencyProfile_BTN_Click(object sender, RoutedEventArgs e)
 {
     AgencyProfile Agencyform = new AgencyProfile(IsAdmin);
     Agencyform.Closed += new EventHandler((s0, e0) => agencySearch_BTN_Click(s0, null));
     Agencyform.Show();
 }
Пример #6
0
 private void menuCreateAgency_Click(object sender, RoutedEventArgs e)
 {
     AgencyProfile Agencyform = new AgencyProfile(IsAdmin);
     Agencyform.Show();
 }
Пример #7
0
        private void Edit_agency_MenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (dbMethods.CheckDatabaseConnection())
            {
                using (PubsDataContext db = new PubsDataContext())
                {
                    Agency agentRow = agencySearch_DataGrid.SelectedItem as Agency;
                    Agency stud = (from a in db.Agencies
                                   where a.Name == agentRow.Name
                                   select a).Single();

                    AgencyProfile agentForm = new AgencyProfile(stud, IsAdmin, true);
                    agentForm.Show();
                }
            }
        }
Пример #8
0
        private void AgencySearch_DataGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            using (PubsDataContext datab = new PubsDataContext())
            {
                Agency agencyRow = agencySearch_DataGrid.SelectedItem as Agency;
                if (agencyRow != null)
                {
                    Agency agent = (from s in datab.Agencies
                                    where s.Name == agencyRow.Name
                                    select s).Single();

                    AgencyProfile agentForm = new AgencyProfile(agent, IsAdmin, true);
                    agentForm.Closed += new EventHandler((s0, e0) => agencySearch_BTN_Click(s0, null));
                    agentForm.Show();
                }
            }
        }