Exemple #1
0
        private void CreateItem()
        {
            CarMarksEditView v = new CarMarksEditView();

            v._id = -1;
            v.ShowDialog();
        }
Exemple #2
0
        private void EditSelectedItem()
        {
            int      id = 0;
            car_mark b  = null;

            if (dgList.SelectedItem != null)
            {
                object sel = dgList.SelectedItem;
                b  = (car_mark)sel;
                id = b.id;
            }
            if (id > 0)
            {
                CarMarksEditView v = new CarMarksEditView();
                v._id                      = b.id;
                v.edtName.Text             = b.name;
                v.edtDescr.Text            = b.description;
                v.edtProducer.SelectedItem = b.car_producer.name;
                v.ShowDialog();
                ReloadList();
            }
        }
 private void EditSelectedItem()
 {
     int id = 0;
     car_mark b = null;
     if (dgList.SelectedItem != null)
     {
         object sel = dgList.SelectedItem;
         b = (car_mark)sel;
         id = b.id;
     }
     if (id > 0)
     {
         CarMarksEditView v = new CarMarksEditView();
         v._id = b.id;
         v.edtName.Text = b.name;
         v.edtDescr.Text = b.description;
         v.edtProducer.SelectedItem = b.car_producer.name;
         v.ShowDialog();
         ReloadList();
     }
 }
 private void CreateItem()
 {
     CarMarksEditView v = new CarMarksEditView();
     v._id = -1;
     v.ShowDialog();
 }