예제 #1
0
        private void btnThemPhong_Click(object sender, EventArgs e)
        {
            frmTextPhong frm = new frmTextPhong(this, "Thêm Phòng");

            frm.ShowDialog();
            listP             = pBus.getallphong();
            gclDSP.DataSource = listP;
        }
예제 #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            List <ePhong> ls = new List <ePhong>();

            if (gridViewPhong.SelectedRowsCount == 1)
            {
                PhongBUS     ph_bus = new PhongBUS();
                string       id     = gridViewPhong.GetRowCellValue(gridViewPhong.FocusedRowHandle, gridViewPhong.Columns[0]).ToString();
                frmTextPhong ftph   = new frmTextPhong(this, "Sửa Phòng", id.ToString());
                ftph.ShowDialog();
            }
            else
            {
                MessageBox.Show("Chọn 1 Phòng Cần Sửa", "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                return;
            }
            ls = pBus.getallphong();
            gclDSP.DataSource = ls;
        }