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