private void frmChiTietPhieuPhong_Load(object sender, EventArgs e)
 {
     SetGridViewStyle(dgvChiTietDichVu);
     FillDichVuCombobox(DichVu.GetAll());
     FillLoaiPhongCombobox(LoaiPhong.GetAll());
     cmbLoaiPhong.SelectedIndex = 0;
     //FillSoPhongCombobox(Phong.GetAll().);
     FillTenBookingCombobox(Booking.GetAll());
     FillComboboxNhanVien(cmbNhanVien, NhanVien.GetAll());
     cmbSoPhong.SelectedIndex  = 0;
     cmbNhanVien.SelectedIndex = 0;
 }
Esempio n. 2
0
 private void frmCapNhatDichVu_Load(object sender, EventArgs e)
 {
     try
     {
         SetGridViewStyle(dgvCapNhatDichVu);
         BindGrid(DichVu.GetAll());
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 3
0
 private void btnXoaDichVu_Click(object sender, EventArgs e)
 {
     try
     {
         int rowIndex = (int)dgvCapNhatDichVu.CurrentRow.Cells[1].Value;
         DichVu.Delete(rowIndex);
         BindGrid(DichVu.GetAll());
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 4
0
        private void btnLuuCapNhatDichVu_Click(object sender, EventArgs e)
        {
            DichVu s = GetDichVu();

            s.DichVuID = (int)dgvCapNhatDichVu.CurrentRow.Cells[1].Value;
            DichVu db = DichVu.GetDichVu(s.DichVuID);

            if (db != null)
            {
                db = s;
                db.InsertUpdate();
                MessageBox.Show("Sửa thành công!");
            }
            BindGrid(DichVu.GetAll());
        }
Esempio n. 5
0
 private void btnThemDichVu_Click(object sender, EventArgs e)
 {
     try
     {
         DichVu s  = GetDichVu();
         DichVu db = DichVu.GetDichVu(s.DichVuID);
         if (db == null)
         {
             s.InsertUpdate();
             MessageBox.Show("Thêm dịch vụ thành công!");
         }
         BindGrid(DichVu.GetAll());
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void cmbTenDichVu_SelectedIndexChanged(object sender, EventArgs e)
 {
     string        tendv    = cmbTenDichVu.SelectedItem.ToString();
     List <DichVu> listKQTK = DichVu.GetAll();
 }