예제 #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            luu = true;
            frmBan_Sua frm = new frmBan_Sua(this.grdBan);

            frm.Text = "Thêm bàn";
            frm.ShowDialog();
        }
예제 #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = this.grdBan.Rows[grdBan.CurrentCell.RowIndex];

            luu = false;
            frmBan_Sua frm = new frmBan_Sua(this.grdBan);

            MaBan        = row.Cells[0].Value.ToString();
            TenBan       = row.Cells[1].Value.ToString();
            SoLuongNguoi = decimal.Parse(row.Cells[2].Value.ToString() + "");
            GhiChu       = row.Cells[3].Value.ToString();
            frm.Text     = "Sửa bàn";
            frm.ShowDialog();
        }