Beispiel #1
0
 private void QuanLyBan_Load(object sender, EventArgs e)
 {
     dsBan.TaiDuLieu();
     dsBanHienTai       = dsBan;
     dagvBan.DataSource = dsBan.TaoDataTableAo();
     cbxDSBan.Text      = cbxDSBan.Items[0].ToString();
 }
Beispiel #2
0
        public void LocBan()
        {
            switch (cbxDSBan.SelectedItem.ToString())
            {
            case "Tất cả bàn":
            {
                dsBanHienTai       = dsBan;
                dagvBan.DataSource = dsBanHienTai.TaoDataTableAo();
            }
            break;

            case "Bàn trống":
            {
                dsBanHienTai       = dsBan.DsBanTrong();
                dagvBan.DataSource = dsBanHienTai.TaoDataTableAo();
            }
            break;

            case "Bàn đang đặt":
            {
                dsBanHienTai       = dsBan.DsBanDat();
                dagvBan.DataSource = dsBanHienTai.TaoDataTableAo();
            }
            break;
            }
        }
Beispiel #3
0
 private void txtTimBan_TextChanged(object sender, EventArgs e)
 {
     char[] aSC = txtTimBan.Text.ToCharArray();
     foreach (char c in aSC)
     {
         if (!Char.IsNumber(c))
         {
             txtTimBan.Text = "";
             break;
         }
     }
     if (txtTimBan.Text != "")
     {
         dagvBan.DataSource = dsBanHienTai.DsBanYeuCau(txtTimBan.Text).TaoDataTableAo();
     }
     else
     {
         dagvBan.DataSource = dsBanHienTai.TaoDataTableAo();
     }
 }