private void companyaddbtn_Click(object sender, RoutedEventArgs e) { if (f.CheckForInternetConnection()) { var companyedit = new companyedit(); companyedit.Show(); this.Close(); } else { MessageBox.Show("אין חיבור לאינטרנט"); } }
private void companyedit_Click(object sender, RoutedEventArgs e) { //string selected = this.companyEditComboBox.SelectedItem.ToString(); if (f.CheckForInternetConnection()) { string selected = ((ComboBoxItem)companyEditComboBox.SelectedItem).Tag.ToString(); company selectedone = f.set_Company(int.Parse(selected)); var companyedit = new companyedit(selectedone); companyedit.Show(); this.Close(); } else { MessageBox.Show("אין חיבור לאינטרנט"); } }