Ejemplo n.º 1
0
 /// <summary>
 /// データベースに CalDate を追加する
 /// </summary>
 /// <param name="CalDate">追加する CalDate</param>
 /// <seealso cref="CalDate"/>
 public void AddRecord(CalDate CalDate)
 {
     try {
         _db.CalDate.Add(CalDate);
         _db.SaveChanges();
     }
     catch (DbUpdateConcurrencyException e) {
         throw new Exception("Db update concurrency exception occured at Add Record", e);
     }
     catch (DbUpdateException e) {
         throw new Exception("Db update exception occured at Update Record", e);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// データベースに HolidayEntry を追加する
 /// </summary>
 /// <param name="Holidays">追加する HolidayEntry</param>
 /// <seealso cref="Holidays"/>
 public void AddRecord(HolidayEntry Holidays)
 {
     try
     {
         _db.Holidays.Add(Holidays);
         _db.SaveChanges();
     }
     catch (DbUpdateConcurrencyException e)
     {
         throw new Exception("Db update concurrency exception occured at Add Record", e);
     }
     catch (DbUpdateException e)
     {
         throw new Exception("Db update exception occured at Update Record", e);
     }
 }
 /// <summary>
 /// データベースに MaterialNeedCal を追加する
 /// </summary>
 /// <param name="MaterialNeedCal">追加する MaterialNeedCal</param>
 /// <seealso cref="MaterialNeedCal"/>
 public void AddRecord(MaterialNeedCal MaterialNeedCal)
 {
     try
     {
         _db.MaterialNeedCal.Add(MaterialNeedCal);
         _db.SaveChanges();
     }
     catch (DbUpdateConcurrencyException e)
     {
         throw new Exception("Db update concurrency exception occured at Add Record", e);
     }
     catch (DbUpdateException e)
     {
         throw new Exception("Db update exception occured at Update Record", e);
     }
 }
 /// <summary>
 /// データベースに ToolInventory を追加する
 /// </summary>
 /// <param name="ToolInventory">追加する ToolInventory</param>
 /// <seealso cref="ToolInventory"/>
 public void AddRecord(ToolInventory ToolInventory)
 {
     try
     {
         _db.ToolInventory.Add(ToolInventory);
         _db.SaveChanges();
     }
     catch (DbUpdateConcurrencyException e)
     {
         throw new Exception("Db update concurrency exception occured at Add Record", e);
     }
     catch (DbUpdateException e)
     {
         throw new Exception("Db update exception occured at Update Record", e);
     }
 }