Esempio n. 1
0
        public void Add(Student student)
        {
            int lastId = LastIdentity(GetAll());

            student.Identity = lastId;
            LastId           = lastId;
            studentDal.Add(student);
        }
Esempio n. 2
0
 public IResult Add(Student student)
 {
     try
     {
         _IStudentDal.Add(student);
         return(new SuccessResult(message: Contants.Messages.AddMessage));
     }
     catch (Exception ex)
     {
         return(new ErrorResult(message: ex.Message));
     }
 }
Esempio n. 3
0
        public void Add(StudentDto studentDto)
        {
            //  ValidationAspect.FluentValidate(new StudentValidatior(), studentDto);
            var student = new Student()
            {
                Name    = studentDto.Name,
                Surname = studentDto.Surname,
            };

            _studentDal.Add(student);
            _studentDal.Save();
        }
        public void Add(Student entity)
        {
            if (Validation(entity))
            {
                return;
            }

            if (_studentDal.Get(p => p.Tc.Equals(entity.Tc)) != null)
            {
                return;
            }

            try
            {
                _studentDal.Add(entity);
                Message.Info("Öğrenci Eklendi!");
            }
            catch
            {
                Message.Error("Öğrenci Eklenemedi!");
            }
        }
Esempio n. 5
0
        public IResult Add(Student student)
        {
            var entity = new Student()
            {
                Name          = student.Name,
                Surname       = student.Surname,
                StudentNumber = student.StudentNumber,
                Grades        = student.Grades
            };

            _studentDal.Add(entity);
            return(new SuccessResult());
        }
 public IResult Add(Student student)
 {
     student.Fee     = 0;
     student.FeePaid = 0;
     try
     {
         _studentDal.Add(student);
     }
     catch (Exception)
     {
         return(new Result(false, "Student cannot be added"));
     }
     return(new Result(true, "Student added"));
 }
Esempio n. 7
0
        public IActionResult Create(Student student)
        {
            var file = Request.Form.Files[0];

            student.PhotoPath = UploadPhoto(file);

            if (ModelState.IsValid)
            {
                _studentDal.Add(student);

                _redisDatabase.KeyDelete("studentList");

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["DepartmentId"] = new SelectList(_departmentDal.GetList(), "Id", "Name", student.DepartmentId);
            return(View(student));
        }
Esempio n. 8
0
 public Student Add(Student entity)
 {
     return(_studentDal.Add(entity));
 }
 public void Add(Student student)
 {
     _studentDal.Add(student);
 }
 public void Add(Student student)
 {
     ValidationTool.Validate(new StudentValidator(), student);
     _studentDal.Add(student);
 }
 public IResult Add(Student student)
 {
     _studentDal.Add(student);
     return(new SuccessResult(Messages.StudentAdded));
 }
Esempio n. 12
0
 public void Add(IStudentDal iStudentDal)
 {
     iStudentDal.Add();
 }
Esempio n. 13
0
 public Student AddStudent(Student student)
 {
     return(_studentdal.Add(student));
 }
Esempio n. 14
0
 public Student Add(Student student)
 {
     return(_studentDal.Add(student));
 }