private void ClientLi_MouseDoubleClick(object sender, MouseButtonEventArgs e) { SecurityContext.idClient = int.Parse((dtClient.Rows[ClientLi.SelectedIndex].ItemArray[0].ToString())); CurrentClient cur = new CurrentClient(); this.Hide(); cur.Show(); }
private void ClientLi_MouseDoubleClick(object sender, MouseButtonEventArgs e) { try { SecurityContext.idClient = int.Parse((dtClient.Rows[ClientLi.SelectedIndex].ItemArray[0].ToString())); CurrentClient cur = new CurrentClient(); this.Hide(); cur.Show(); } catch { MessageBox.Show("Вы пытаетесь выбрать пустое поле"); ClientLi.ItemsSource = dtClient.DefaultView; } }