Beispiel #1
0
        public IActionResult AddGradeDetail([FromBody] CreateEditRespGroupDetailViewModel RespGroupDetail)
        {
            var model = new RespGroupDetail();

            if (RespGroupDetail is null)
            {
                return(BadRequest("Responsibility Group Detail is null."));
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            //grade.GroupGradeID = EncryptionHelper.DecryptUrlParam(grade.GroupGradeID);
            //int headerID = Int32.Parse(grade.GroupGradeID);
            var gradeMapper = _mapper.Map(RespGroupDetail, model);

            _resGroupDetailProvider.Add(gradeMapper);
            return(Ok());
        }
Beispiel #2
0
 public int Edit(RespGroupDetail entity)
 {
     context.SbEdit(entity);
     return(context.SaveChanges());
 }
Beispiel #3
0
 public int Add(RespGroupDetail entity)
 {
     context.SbAdd(entity);
     return(context.SaveChanges());
 }