コード例 #1
0
 /// <summary>
 /// Save sparepart into file
 /// </summary>
 /// <param name="sparepart"></param>
 public void Save(Sparepart sparepart)
 {
     using (Training.Workshop.UnitOfWork.UnitOfWork.Start())
     {
         ((IFileUnitOfWork)Training.Workshop.UnitOfWork.UnitOfWork.Current).Database.spareparts.Add(sparepart);
         ((IFileUnitOfWork)Training.Workshop.UnitOfWork.UnitOfWork.Current).Commit();
     }
 }
コード例 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sparepartname"></param>
 /// <param name="partnumber"></param>
 /// <param name="price"></param>
 /// <returns></returns>
 public virtual Sparepart Create(string manufacturername,string sparepartname, string partnumber, int price)
 {
     var sparepart = new Sparepart
     {
         SparepartManufacturer=manufacturername,
         SparepartName = sparepartname,
         PartNumber = partnumber,
         Price = price
     };
     Data.Context.Current.RepositoryFactory.GetSparepartRepository()
       .Save(sparepart);
     return sparepart;
 }
 /// <summary>
 /// Saves sparepart into repository
 /// </summary>
 /// <param name="user"></param>
 public void Save(Sparepart user)
 {
     // TODO
     // need realization
 }
コード例 #4
0
 /// <summary>
 /// Save New sparepart to SQL Database
 /// </summary>
 /// <param name="sparepart"></param>
 public void Save(Sparepart sparepart)
 {
     //check if
 }