private void ExecuteRemoveStudentCommand(object sender)
        {
            StudentBusinessLogic business = new StudentBusinessLogic();

            STUD_Students_Master student = business.GetAllStudents().Where(S => S.IsActive == true && S.Student_ID == CurrentStudent.StudentId).FirstOrDefault();

            student.IsActive = false;

            STUD_DetainingOrPromotions_Details DetOrPro = new STUD_DetainingOrPromotions_Details()
            {
                Student_ID           = CurrentStudent.StudentId,
                CurrentAcadDetail_ID = CurrentStudent.AccDetId,
                LastAcadDetail_ID    = CurrentStudent.AccDetId,
                Status_ID            = 3, //Status id for TC issue
                EnteredBy            = S360Model.S360Configuration.Instance.UserID,
                Login_ID             = S360Model.S360Configuration.Instance.LoginID
            };

            STUD_Student_TC TC = new STUD_Student_TC()
            {
                Student_ID  = CurrentStudent.StudentId,
                RegNo       = CurrentStudent.RegNo,
                IssuedOn    = DateTimeOffset.Now,
                IssuedBy_ID = S360Model.S360Configuration.Instance.UserID,
                Login_ID    = S360Model.S360Configuration.Instance.LoginID
            };

            business.UpdateStudent(student);
            business.SaveStudentDetainPromotion(DetOrPro);
            business.SaveIssueTC(TC);

            ExecuteClearAllCommand(null);
        }
        /// <summary>
        /// Method to save Student Promotion detail
        /// </summary>
        /// <param name="studentAcademicDetails"></param>
        public void SavePromotion(STUD_StudentAcademic_Details studentsaccademicdetails)
        {
            //insert into STUD_StudentAcademic_Details table
            Decimal LastAccDetId = studentsaccademicdetails.AcademicDet_ID;

            if (studentsaccademicdetails != null)
            {
                try
                {
                    _StudentAcademicRepository.Insert(studentsaccademicdetails);

                    STUD_DetainingOrPromotions_Details promotion = new STUD_DetainingOrPromotions_Details()
                    {
                        CurrentAcadDetail_ID = studentsaccademicdetails.AcademicDet_ID,
                        LastAcadDetail_ID    = LastAccDetId,
                        Status_ID            = 1,
                        Student_ID           = studentsaccademicdetails.Student_ID,
                        EnteredBy            = S360Model.S360Configuration.Instance.UserID,
                        Login_ID             = S360Model.S360Configuration.Instance.LoginID
                    };

                    //Insert into STUD_DetainingOrPromotions_Details table
                    SaveStudentDetainPromotion(promotion);
                }
                catch (Exception Ex)
                {
                    throw new S360Exceptions.S360Exception(Ex.Message, Ex.InnerException);
                }
            }
        }
 /// <summary>
 /// Save Promotion or detain info
 /// </summary>
 /// <param name="DetPromo"></param>
 public void SaveStudentDetainPromotion(STUD_DetainingOrPromotions_Details DetPromo)
 {
     _studentDetainPromotionRepository.Insert(DetPromo);
 }