Interaction logic for AgencyProfile.xaml TODO - Adjust Database, Types of servie bits are allowing nulls
Inheritance: System.Windows.Window
Esempio n. 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();
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 4
0
        private void menuCreateAgency_Click(object sender, RoutedEventArgs e)
        {
            AgencyProfile Agencyform = new AgencyProfile(IsAdmin);

            Agencyform.Show();
        }
Esempio n. 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();
 }
Esempio n. 6
0
 private void menuCreateAgency_Click(object sender, RoutedEventArgs e)
 {
     AgencyProfile Agencyform = new AgencyProfile(IsAdmin);
     Agencyform.Show();
 }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
                }
            }
        }