Example #1
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Bạn có thực sự muốn xóa??", "Thông báo", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.OK)
     {
         MaKhu = Convert.ToInt32(txtMaKhu.Text);
         KhuTroChoi KTC = new Entity.KhuTroChoi(MaKhu, "", -1, -1, "", "");
         Khutrochoi.Khutrochoi_Delete(KTC);
         LoadData();
     }
 }
Example #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            GiaTreEm    = Convert.ToInt32(txtGiaTE.Text);
            GiaNguoiLon = Convert.ToInt32(txtGiaNL.Text);
            GioMo       = dtpGioMo.Value.ToString("HH:mm");
            GioDong     = dtpGioDong.Value.ToString("HH:mm");
            KhuTroChoi KTC = new Entity.KhuTroChoi(-1, txtTenKhu.Text, GiaNguoiLon, GiaTreEm, GioMo, GioDong);

            if (Khutrochoi.Khutrochoi_Insert(KTC))
            {
                LoadData();
            }
            else
            {
                MessageBox.Show("Thất bại");
            }
        }