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