Ejemplo n.º 1
0
 public bool Add(DatCho order)
 {
     if (DatCho.Add(order))
     {
         if (List == null)
         {
             List = DatCho.All();
         }
         List.Add(order);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
 public bool Delete(DatCho order)
 {
     if (DatCho.Delete(order))
     {
         if (List == null)
         {
             List = DatCho.All();
         }
         for (int i = 0; i < List.Count; i++)
         {
             if (List[i].MChuyen == order.MChuyen && List[i].MKHang == order.MKHang)
             {
                 List.RemoveAt(i);
             }
         }
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 public List <DatCho> All()
 {
     return(List = DatCho.All());
 }
Ejemplo n.º 4
0
 public OrderList()
 {
     List = new List <DatCho>();
     List = DatCho.All();
 }