Exemplo n.º 1
0
 private void UpdateProductBtn_Click(object sender, EventArgs e)
 {
     this.productsPanel[3].BringToFront();
     ServiceReference1.ProductServiceClient client = new ServiceReference1.ProductServiceClient();
     products = new List <ServiceReference1.Product>(client.GetAllProduct());
     setGridView3();
 }
Exemplo n.º 2
0
        private void ViewProducsBtn_Click(object sender, EventArgs e)
        {
            this.productsPanel[1].BringToFront();
            var source = new BindingSource();

            ServiceReference1.ProductServiceClient client = new ServiceReference1.ProductServiceClient();
            List <ServiceReference1.Product>       pList  = new List <ServiceReference1.Product>(client.GetAllProduct());

            source.DataSource        = pList;
            dataGridView1.DataSource = source;
            dataGridView1.Columns["ProductId"].DisplayIndex        = 0;
            dataGridView1.Columns["ProductName"].DisplayIndex      = 1;
            dataGridView1.Columns["ProductPrice"].DisplayIndex     = 2;
            dataGridView1.Columns["TotalQuantity"].DisplayIndex    = 3;
            dataGridView1.Columns["QuantityAtShop"].DisplayIndex   = 4;
            dataGridView1.Columns["QuantityAtGodown"].DisplayIndex = 5;
            dataGridView1.Columns["Description"].DisplayIndex      = 6;
        }