public DeleteStudent DeleteStudent(DeleteStudent obj)
        {
            var returnModel           = new DeleteStudent();
            var Student               = _studentsRepo.Get(obj.StudentId);
            var studentsList          = _studentsRepo.GetAll().ToList();
            var StudentPromotionsList = _StudentPromotionsRepo.GetAll().ToList();
            var query = (from p in StudentPromotionsList
                         where p.StudentId == obj.StudentId
                         select p);

            foreach (var item in query)
            {
                var StudentPromotion = _StudentPromotionsRepo.Get(item.Id);
                if (StudentPromotion != null)
                {
                    _StudentPromotionsRepo.Delete(StudentPromotion);
                    returnModel.Message = "Delete Successful.";
                }
            }
            if (Student != null)
            {
                _studentsRepo.Delete(Student);
                if (Student.IP300X200 != null)
                {
                    string DelImgofIP300X200 = Path.Combine(obj.WebRootPath, Student.IP300X200);
                    _commonServ.DelFileFromLocation(DelImgofIP300X200);
                }
                returnModel.Message = "Delete Successful.";
            }
            return(returnModel);
        }
        public string UpdateStudentPromotion(UpdateStudentPromotion obj)
        {
            string returnResult = (dynamic)null;

            try
            {
                if (obj != null)
                {
                    var ClassYear = DateTime.ParseExact(obj.StudentPromotions.Year, "yyyy", null);
                    if (obj.StudentPromotions != null)
                    {
                        var currentItem = _StudentPromotionsRepo.Get(obj.StudentPromotions.Id);
                        currentItem.Id           = obj.StudentPromotions.Id;
                        currentItem.StudentId    = obj.StudentPromotions.StudentId;
                        currentItem.ClassId      = obj.StudentPromotions.ClassId;
                        currentItem.RollNo       = obj.StudentPromotions.RollNo;
                        currentItem.ClassYear    = ClassYear;
                        currentItem.IsActive     = obj.StudentPromotions.IsActive;
                        currentItem.AddedBy      = 0;
                        currentItem.AddedDate    = DateTime.Now;
                        currentItem.ModifiedBy   = 0;
                        currentItem.ModifiedDate = DateTime.Now;
                        currentItem.DataType     = null;

                        _StudentPromotionsRepo.Update(currentItem);
                        returnResult = "Saved";
                    }
                }
            }
            catch (Exception ex)
            {
                returnResult = "ERROR102:FeeTypesServ/UpdateFeeTypes - " + ex.Message;
            }

            return(returnResult);
        }