Esempio n. 1
0
        /// <summary>
        /// Delete Student from data base
        /// </summary>
        public void Delete()
        {
            // Check if delete is
            if (SqlDbConnect.DeleteInformation(int.Parse(StudentID.OriginalText)))
            {
                // Shows message that update was success
                IoC.UI.ShowMessage(new MessageBoxDialogViewModel
                {
                    Title   = "Congratulation!",
                    Message = "Student was successfully deleted!",
                    OkText  = "OK"
                });

                // Gets all new items from data base
                StudentListDesignModel.Instance.Items = SqlDbConnect.CreateStudentsListViewModel();

                // Shows block screen
                IoC.Application.BlockScreenVisible = true;
            }
        }