Exemplo n.º 1
0
        protected override bool OnEdit(Entity item)
        {
            var selectedItem = (Course)item;

            using (var frm = new frmCourse_Add())
            {
                frm.ItemData = selectedItem;
                if (frm.ShowDialog() != DialogResult.OK)
                {
                    return(false);
                }
            }

            App.LogAction("School Year.Course", "Updated Course : " + selectedItem.CourseCode);

            return(true);
        }
Exemplo n.º 2
0
        protected override Entity OnAdd()
        {
            var newItem = new Course();

            using (var frm = new frmCourse_Add())
            {
                frm.ItemData = newItem;
                if (frm.ShowDialog() != DialogResult.OK)
                {
                    return(null);
                }
            }

            App.LogAction("School Year.Course", "Created Course : " + newItem.CourseCode);


            ItemDataCollection.Add(newItem);

            return(newItem);
        }