Example #1
0
 public bool Add(DatCho order)
 {
     if (DatCho.Add(order))
     {
         if (List == null)
         {
             List = DatCho.All();
         }
         List.Add(order);
         return(true);
     }
     return(false);
 }
Example #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);
 }
Example #3
0
        public List <Chuyen> Find(List <DatCho> order)
        {
            List <Chuyen> result    = new List <Chuyen>();
            List <DatCho> ordercopy = new List <DatCho>();

            foreach (DatCho item in order)
            {
                DatCho i = new DatCho();
                i.MChuyen = item.MChuyen;
                ordercopy.Add(i);
            }
            foreach (Chuyen item in List)
            {
                if (Find(item, ordercopy))
                {
                    result.Add(item);
                }
            }
            return(result);
        }
Example #4
0
        public static bool Delete(DatCho dc)
        {
            object rs = DataProvider.Instance.ExecuteNonQuery("DatCho_Delete", dc.MChuyen, dc.MKHang);

            return(MyConvert.ToInt32(rs) > 0);
        }
Example #5
0
 public List <DatCho> All()
 {
     return(List = DatCho.All());
 }
Example #6
0
 public OrderList()
 {
     List = new List <DatCho>();
     List = DatCho.All();
 }