Exemplo n.º 1
0
 void loadphongan()
 {
     for (int i = 0; i < pHONGTableAdapter.GetDataByPhongTheoKhu(Convert.ToInt32(bientoancuc.makhuvuc)).Rows.Count; i++)
     {
         ShowPhong phong = new ShowPhong();
         phong.ButtonClick += Phong_ButtonClick;
         phong.Size         = new Size(92, 118);
         groupPanel1.Text   = "danh sách bàn" + bientoancuc.makhuvuc + "";
         phong.loadphong(pHONGTableAdapter.GetDataByPhongTheoKhu(Convert.ToInt32(bientoancuc.makhuvuc)).Rows[i][1].ToString(), pHONGTableAdapter.GetDataByPhongTheoKhu(Convert.ToInt32(bientoancuc.makhuvuc)).Rows[i][6].ToString(), Convert.ToInt32(pHONGTableAdapter.GetDataByPhongTheoKhu(Convert.ToInt32(bientoancuc.makhuvuc)).Rows[i][3].ToString()), Convert.ToInt32(pHONGTableAdapter.GetDataByPhongTheoKhu(Convert.ToInt32(bientoancuc.makhuvuc)).Rows[i][2].ToString()));
         flowLayoutPanel1.Controls.Add(phong);
     }
 }
Exemplo n.º 2
0
 //tìm kiếm phòng theo điều kiện khách hàng
 private void buttonX2_Click(object sender, EventArgs e)
 {
     ressetphong();
     foreach (var item in pHONGTableAdapter.GetDataByALL(Convert.ToInt32(bientoancuc.makhuvuc), Convert.ToInt32(comboBoxEx2.SelectedValue), Convert.ToInt32(numericUpDown1.Value)))
     {
         ShowPhong phong = new ShowPhong();
         phong.ButtonClick += Phong_ButtonClick;
         phong.Size         = new Size(92, 118);
         groupPanel1.Text   = "danh sách bàn" + bientoancuc.makhuvuc + "";
         phong.loadphong(item.TenPH, item.TinhTrang, item.MaLP, item.SucChua);
         flowLayoutPanel1.Controls.Add(phong);
     }
 }