Example #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            luu = true;
            frmDoUong_Sua frm = new frmDoUong_Sua(this.grdDoUong);

            frm.Text = "Thêm đồ uống";
            frm.ShowDialog();
        }
Example #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = this.grdDoUong.Rows[grdDoUong.CurrentCell.RowIndex];

            luu = false;
            frmDoUong_Sua frm = new frmDoUong_Sua(this.grdDoUong);

            MaDo_Uong  = row.Cells[0].Value.ToString();
            TenDo_Uong = row.Cells[1].Value.ToString();
            DonGia     = decimal.Parse(row.Cells[2].Value.ToString() + "");
            SoLuongTon = decimal.Parse(row.Cells[3].Value.ToString() + "");
            GhiChu     = row.Cells[4].Value.ToString();
            frm.Text   = "Sửa đồ uống";
            frm.ShowDialog();
        }