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

            edt.Owner = this;
            edt.ShowDialog();
            UpdatePageCount();
            UpdateGrid();
        }
Exemplo n.º 2
0
 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();
     }
 }
Exemplo n.º 3
0
 public void Row_DoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (sender is DataGridRow row)
     {
         if (fromOtherView)
         {
             TemporaryStorage.Holder.Add("ID", ((DataRowView)row.Item).Row.ItemArray[1].ToString());
             this.Close();
             return;
         }
         var edt = new OrderEdit(_connectionSettings, OpenType.View, Convert.ToInt32(((DataRowView)row.Item).Row.ItemArray[1].ToString()));
         edt.Owner = this;
         edt.ShowDialog();
         UpdatePageCount();
         UpdateGrid();
     }
 }