Exemple #1
0
 public void UpdateOne(FixedArrangementCostsDTO dto)
 {
     try
     {
         using (ISession session = NHibernateHelper.OpenSession())
             using (ITransaction transaction = session.BeginTransaction())
             {
                 session.Update(dto);
                 transaction.Commit();
             }
     }
     catch (Exception)
     {
         throw new HibernateException("Error when updating fixed arrangement costs");
     }
 }
        public FixedArrangementCosts ToServiceModel(FixedArrangementCostsDTO dto)
        {
            var test = new FixedArrangementCosts();

            //{
            test.Id                      = dto.Id;
            test.GeneratedDate           = dto.GeneratedDate;
            test.PricePerBeer            = dto.PricePerBeer;
            test.PricePerWine            = dto.PricePerWine;
            test.FixedTechRental         = dto.FixedTechRental;
            test.SoundmanSalery          = dto.SoundmanSalery;
            test.SoundmanSaleryPerWarmUp = dto.SoundmanSaleryPerWarmUp;
            test.PromotionExpences       = dto.PromotionExpences;
            test.FixedCosts              = dto.FixedCosts;
            test.DocumentId              = dto.DocumentId;
            return(test);
            //};
        }