예제 #1
0
        private void Save_button_Click(object sender, EventArgs e)
        {
            productList = new List <Product>();
            Product newProduct = new Product();

            newProduct.Name     = Name.Text;
            newProduct.Price    = Convert.ToDouble(Price.Text);
            newProduct.Category = Category.Text;
            newProduct.Brand    = Brand.Text;
            newProduct.Color    = Color.Text;
            newProduct.Barcode  = Convert.ToInt32(Barcode.Text);
            newProduct.Stock    = Stock.Text;
            newProduct.Ad       = Ad.Text;


            GridView.Rows.Add(newProduct.Name, newProduct.Price, newProduct.Category, newProduct.Brand, newProduct.Color, newProduct.Barcode, newProduct.Stock, newProduct.Ad);

            productList.Add(newProduct);


            Name.Clear();
            Price.Clear();
            Color.Clear();
            Barcode.Clear();
            Stock.Clear();
            Ad.Clear();
        }
예제 #2
0
 void Clear()
 {
     txtretId.Clear();
     txtorderid.Clear();
     txtorderid.Clear();
     Barcode.Clear();
     Product_name.Clear();
     R_price.Clear();
     Qte.Clear();
     Dis.Clear();
     T_Pric.Clear();
     Prog_User.Clear();
     Notes.Clear();
 }