예제 #1
0
 /// <summary>
 ///     Insert Shift Status
 /// </summary>
 /// <param name="ss"></param>
 /// <returns>true if successful</returns>
 public bool InsertShiftStatus(ShiftStatusDAO ss)
 {
     try
     {
         if (ss != null)
         {
             //map it to EF object
             var itm = mapper.MapToEntity(ss);
             db.ShiftStatus.Add(itm);
             return(db.SaveChanges() > 0);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception e)
     {
         throw;
     }
 }
예제 #2
0
 public bool InsertJobTitle(JobTitle j)
 {
     db.JobTitle.Add(j);
     return(db.SaveChanges() > 0);
 }