protected override bool OnEdit(Entity item) { var selectedItem = (Batch)item; using (var frm = new frmBatch_Add()) { frm.ItemData = selectedItem; if (frm.ShowDialog() != DialogResult.OK) { return(false); } } App.LogAction("School Year.Batch", "Updated Batch : " + selectedItem.BatchName); return(true); }
protected override Entity OnAdd() { var newItem = new Dll.SchoolYear.Batch(); using (var frm = new frmBatch_Add()) { frm.ItemData = newItem; if (frm.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return(null); } } App.LogAction("School Year.Batch", "Created Batch : " + newItem.BatchName); ItemDataCollection.Add(newItem); return(newItem); }