예제 #1
0
 /// <summary>
 /// Удаление заказа
 /// </summary>
 /// <param name="orderView"></param>
 public void Delete(OrderViewModel orderView)
 {
     orderRepository.Delete(Convert(orderView));
 }
예제 #2
0
 /// <summary>
 /// Редактирование заказа
 /// </summary>
 /// <param name="category"></param>
 public void Edit(OrderViewModel orderView)
 {
     orderView.UpdateDate = DateTime.Now;
     orderRepository.Add(Convert(orderView));
 }
예제 #3
0
 /// <summary>
 /// Конвертационные функции
 /// </summary>
 private Models.Order Convert(OrderViewModel c)
 {
     return new Models.Order()
     {
         Id = c.Id,
         CreatedDate = c.CreatedDate,
         UpdateDate = c.UpdateDate,
         CustomerId = c.CustomerId
     };
 }