示例#1
0
 public Result FromDTO(ResultDTO dto)
 {
     return new Result
                {
                    Id = dto.Id,
                    Period = ((ResultPeriod)dto.Period).ToString(),
                    Year = dto.Year,
                    Comment = dto.Comment,
                    UsedBudget = ((BudgetType)dto.UsedBudget).ToString()
                };
 }
示例#2
0
 public void SaveNewOverview(ResultDTO resultDTO)
 {
     using (ISession session = NHibernateHelper.OpenSession())
     using (ITransaction transaction = session.BeginTransaction())
     {
         session.Save(resultDTO);
         transaction.Commit();
     }
 }