Beispiel #1
0
        public List <tblProduct> GetProducts()
        {
            string            sql      = "select * from tblProduct ";
            SqlDataReader     reader   = ReadData(sql);
            List <tblProduct> products = new List <tblProduct>();

            while (reader.Read())
            {
                tblProduct product = new tblProduct();
                product.ID      = reader.GetString(0);
                product.Descrip = reader.GetString(1);
                product.Price   = reader.GetString(2);
                product.Type    = reader.GetString(3);
                product.Size    = reader.GetString(4);
                product.Brand   = reader.GetString(5);
                product.Stock   = reader.GetString(6);
                //product.NetPrice = reader.GetString(7);
                //product.Manufacturer = reader.GetString(8);
                product.CritLimit = reader.GetString(7);
                products.Add(product);
            }
            reader.Close();
            return(products);
        }
 public bool Delete(tblProduct product)
 {
     return(Delete(product.ID));
 }
Beispiel #3
0
 partial void DeletetblProduct(tblProduct instance);
Beispiel #4
0
 partial void UpdatetblProduct(tblProduct instance);
Beispiel #5
0
 partial void InserttblProduct(tblProduct instance);
Beispiel #6
0
 private void detach_tblProducts(tblProduct entity)
 {
     this.SendPropertyChanging();
     entity.tblProductCategory = null;
 }