Exemple #1
0
        //Control Product Panel-----------------------------------------------------------------------------------
        private void LoadProductType()
        {
            var productTypes = new PublicProductService().GetProductType();

            productTypes.ForEach(prdt =>
            {
                select_productType.Items.Add(prdt.ProductTypeId + " - " + prdt.ProductTypeName);
            });
        }
Exemple #2
0
        private void LoadProducts(int typeid)
        {
            product_table.Rows.Clear();
            var products = new PublicProductService().GetProductByType(typeid);

            products.ForEach(p =>
            {
                DataGridViewRow row = new DataGridViewRow();
                row.CreateCells(product_table);

                row.Cells[0].Value = p.ProductId;
                row.Cells[1].Value = p.ProductName;
                row.Cells[2].Value = p.ProductAmount;
                product_table.Rows.Add(row);
            });
        }
Exemple #3
0
        private void LoadTable()
        {
            product_table.Rows.Clear();
            List <Product> products = new PublicProductService().GetProductByType(search_product_type.SelectedIndex);

            products.ForEach(s =>
            {
                DataGridViewRow row = new DataGridViewRow();
                row.CreateCells(product_table);

                row.Cells[0].Value = s.ProductId;
                row.Cells[1].Value = s.ProductName;
                row.Cells[2].Value = s.ProductAmount;
                row.Cells[3].Value = s.ProductPrice;
                row.Cells[4].Value = s.ProductDescription;
                row.Cells[5].Value = s.ProductTypeId;
                row.Cells[6].Value = s.ProductImg;
                product_table.Rows.Add(row);
            });
        }