Advertisement
MarMar_IV

OrderForm

Apr 19th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace app.ORM.Models
  8. {
  9.     class OrderForm
  10.     {
  11.         public decimal OrderFormID { get; private set; }
  12.         public DateTime Created { get; set; }
  13.         public bool Compleated { get; set; }
  14.         public UserSession UserSession { get; set; }
  15.         public List<OrderItem> OrderItems { get; set; }
  16.  
  17.         public OrderForm(DateTime created, bool compleated, UserSession userSession) : this (-1, created, compleated, userSession)
  18.         {
  19.  
  20.         }
  21.  
  22.         public OrderForm(decimal orderFormID, DateTime created, bool compleated, UserSession userSession) {
  23.             this.OrderFormID = orderFormID;
  24.             this.Created = created;
  25.             this.Compleated = compleated;
  26.             this.UserSession = userSession;
  27.  
  28.             this.OrderItems = new List<OrderItem>();
  29.         }
  30.  
  31.         public void addItemToOrder(OrderItem orderItem) {
  32.             this.OrderItems.Add(orderItem);
  33.         }
  34.  
  35.         public void removeItemFromOrder(OrderItem orderItem)
  36.         {
  37.             this.OrderItems.Remove(orderItem);
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement