Ejemplo n.º 1
0
        private void PurUpdateBtn_Click_1(object sender, EventArgs e)
        {
            if (this.textBox5.Text == "" || this.textBox6.Text == "")
            {
                MessageBox.Show("Insert data");
            }
            else
            {
                InventoryR i = new InventoryR();
                i.ProductId = this.textBox5.Text;
                i.Price     = Convert.ToInt32(this.textBox6.Text);


                FinanceRepository f = new FinanceRepository();
                if (f.UpdatePrice(i))
                {
                    List <InventoryR> iList = f.GetAllProduct();
                    this.dataGrid3.DataSource = iList;

                    this.textBox5.Text = "";
                    this.textBox6.Text = "";
                }
                else
                {
                    MessageBox.Show("Can Not Update Price", "Update Error");
                }
            }
        }
Ejemplo n.º 2
0
        private void bunifuFlatButton3_Click_1(object sender, EventArgs e)
        {
            this.groupBox1.Visible = false;
            this.groupBox2.Visible = false;
            this.groupBox3.Visible = true;
            this.groupBox4.Visible = false;

            this.dataGrid.Visible  = false;
            this.dataGrid2.Visible = false;
            this.dataGrid3.Visible = true;

            FinanceRepository f         = new FinanceRepository();
            List <InventoryR> allResult = f.GetAllProduct();

            this.dataGrid3.DataSource = allResult;
        }