예제 #1
0
 private void cboLoai_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cboLoai.SelectedIndex == 0)
     {
         panMain.Controls.Clear();
         if (dvSerial != null)
         {
             dvSerial.RowFilter = "TRUE";
         }
     }
     if (cboLoai.SelectedIndex == 1)
     {
         panMain.Controls.Clear();
         ucTimKiemKH uc = new ucTimKiemKH();
         uc.guiMa += NhanMa;
         panMain.Controls.Add(uc);
         uc.Dock = DockStyle.Fill;
     }
     if (cboLoai.SelectedIndex == 2)
     {
         panMain.Controls.Clear();
         ucTimKiemNCC uc = new ucTimKiemNCC();
         uc.guiMa += NhanMa;
         panMain.Controls.Add(uc);
         uc.Dock = DockStyle.Fill;
     }
 }
예제 #2
0
 private void frmTim_Load(object sender, EventArgs e)
 {
     if (loai == Loai.KhachHang)
     {
         ucTimKiemKH uc = new ucTimKiemKH();
         uc.guiMa += NhanMa;
         panMain.Controls.Add(uc);
         uc.Dock = DockStyle.Fill;
     }
     else if (loai == Loai.NhaCungCap)
     {
         ucTimKiemNCC uc = new ucTimKiemNCC();
         uc.guiMa += NhanMa;
         panMain.Controls.Add(uc);
         uc.Dock = DockStyle.Fill;
     }
 }