예제 #1
0
        public void UnloadList(Product pobj)
        {
            using(StreamWriter swo = new StreamWriter(stream, swo.Encoding))
            {
                swo.WriteLine(pobj.Name + " , " + pobj.Category + " , " + pobj.SubCategory + " , " + pobj.Amount + " , " + pobj.Status + " , " + pobj.Id + " , " + pobj.ExtraInfo);
                swo.Flush();

            }
        }
예제 #2
0
        public Product SearchProd(Product productobj,string srcname)
        {
            foreach (var item in listaProduse)
            {
                if(item.Name == srcname)
                {
                    productobj = item;
                }

            }
            return productobj;
        }
예제 #3
0
 //Constructor
 public RegisteredOrderState(Product product)
 {
     productToDeliver.product = product;
 }
예제 #4
0
 //Constructor
 public WithCourierState(Product product)
 {
     productToDeliver.product = product;
 }
예제 #5
0
 public DelieveredState(Product product)
 {
     productToDeliver.product = product;
 }
예제 #6
0
 public void LoadList(Product pobj)
 {
 }
예제 #7
0
 //Constructor
 public InTranzitState(Product product)
 {
     productToDeliver.product = product;
 }
예제 #8
0
 public void RemoveProduct(Product productobj)
 {
     listaProduse.Remove(productobj);
 }
예제 #9
0
 /// <summary>
 /// Add a product object, to the product list
 /// </summary>
 /// <param name="productobj"> - the object added @ productlist</param>
 public void AddProduct(Product productobj)
 {
     listaProduse.Add(productobj);
 }