Пример #1
0
        private void CreateItem()
        {
            CarProducersEditView v = new CarProducersEditView();

            v._id = -1;
            v.ShowDialog();
        }
Пример #2
0
        private void EditSelectedItem()
        {
            int          id = 0;
            car_producer b  = null;

            if (dgList.SelectedItem != null)
            {
                object sel = dgList.SelectedItem;
                b  = (car_producer)sel;
                id = b.id;
            }
            if (id > 0)
            {
                CarProducersEditView v = new CarProducersEditView();
                v._id           = b.id;
                v.edtName.Text  = b.name;
                v.edtDescr.Text = b.descripton;
                v.ShowDialog();
                ReloadList();
            }
        }
Пример #3
0
 private void EditSelectedItem()
 {
     int id = 0;
     car_producer b = null;
     if (dgList.SelectedItem != null)
     {
         object sel = dgList.SelectedItem;
         b = (car_producer)sel;
         id = b.id;
     }
     if (id > 0)
     {
         CarProducersEditView v = new CarProducersEditView();
         v._id = b.id;
         v.edtName.Text = b.name;
         v.edtDescr.Text = b.descripton;
         v.ShowDialog();
         ReloadList();
     }
 }
Пример #4
0
 private void CreateItem()
 {
     CarProducersEditView v = new CarProducersEditView();
     v._id = -1;
     v.ShowDialog();
 }