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

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