Beispiel #1
0
 private void simpleButton3_Click(object sender, EventArgs e)
 {
     try
     {
         if (xoa.deleteKhach(gridLookUpEdit1.EditValue.ToString(), gridLookUpEdit2.EditValue.ToString()) == true)
         {
             MessageBox.Show("Thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             nhu();
             gridLookUpEdit2.Properties.DataSource    = a.LoadTenChoNgoi(gridLookUpEdit1.EditValue.ToString());
             gridLookUpEdit2.Properties.DisplayMember = "TenChoNgoi";
             gridLookUpEdit2.Properties.ValueMember   = "TenChoNgoi";
             gridLookUpEdit2.Properties.BestFitMode   = BestFitMode.BestFitResizePopup;
             //dòng này để gridcontrol trong GridlookupEdit tự động resize các column để không thừa không         thiếu nội dung
             gridLookUpEdit2.Properties.ImmediatePopup = true;
             // dòng này tự động mở popup khi search có kết quả
             gridLookUpEdit2.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
         }
         else
         {
             MessageBox.Show("Thất bại", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch
     {
         MessageBox.Show("Chưa chọn ghế muốn hủy vé", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            TXS_QLBX xoa = new TXS_QLBX();

            if (xoa.deleteKhach(idve, tcn) == true)
            {
                MessageBox.Show("Thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("That bai", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            doive_Load(sender, e);

            //   idve = dataGridView1["IdVe", e.RowIndex].Value.ToString();
            dataGridView2.DataSource = DataProvider.Instance.ExcuteQuery("select tenchongoi from ChoNgoi where chongoi.idve='" + idve + "' and IdChuyen='" + idchuyen + "'");
        }