private void Create_Click(object sender, RoutedEventArgs e)
        {
            var edt = new OrderEdit(_connectionSettings, OpenType.New);

            edt.Owner = this;
            edt.ShowDialog();
            UpdatePageCount();
            UpdateGrid();
        }
 public void Row_DoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (sender is DataGridRow row)
     {
         var edt = new OrderEdit(_connectionSettings, OpenType.View, Convert.ToInt32(((DataRowView)row.Item).Row.ItemArray[1].ToString()));
         edt.Owner = this;
         edt.ShowDialog();
         UpdatePageCount();
         UpdateGrid();
     }
 }
 private void Edit_Click(object sender, RoutedEventArgs e)
 {
     if (UserGrid.SelectedItem != null)
     {
         DataRowView row = UserGrid.SelectedItem as DataRowView;
         var         edt = new OrderEdit(_connectionSettings, OpenType.Edit, Convert.ToInt32(row.Row.ItemArray[1]));
         edt.Owner = this;
         edt.ShowDialog();
         UpdatePageCount();
         UpdateGrid();
     }
 }