Example #1
0
 public SaveResult Add(PeriodGradeGroupModel entity)
 {
     try
     {
         ObjectParameter param1 = new ObjectParameter("periodGradeGroupId", entity.PeriodGradeGroupId);
         var             result = _context.proc_PeriodGradeGroup_Insert(param1, entity.PeriodGradeModel.PeriodGradeId,
                                                                        entity.GroupNumber, entity.GroupDescription,
                                                                        entity.LeaderId);
         return(new SaveResult
         {
             Id = (int)param1.Value,
             Message = "Group was created.",
             Status = "OK"
         });
     }
     catch (Exception ex)
     {
         return(new SaveResult
         {
             Id = 0,
             Message = "Error on GradeGroup Add method. " + ex.InnerException != null ? ex.InnerException.Message : ex.Message,
             Status = "ERROR"
         });
     }
 }