예제 #1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            ProductImage productImage = new ProductImage();

            productImage.Search = txtSearch.Text;
            try
            {
                productImage.ProductId = Convert.ToInt32(cmbProduct.SelectedValue);
            }
            catch (Exception) { }

            myGrid2.DataSource = productImage.Select().Tables[0];
        }
        private void formProductImage_Load(object sender, EventArgs e)
        {
            DAL.ProductImage productImage = new ProductImage();
            productImage.Search = textBoxSearch.Text;
            proGrid1.DataSource = productImage.Select().Tables[0];

            DAL.Product product = new Product();
            comboBoxProduct.DataSource    = product.Select().Tables[0];
            comboBoxProduct.DisplayMember = "name";
            comboBoxProduct.ValueMember   = "id";
            comboBoxProduct.SelectedValue = -1;

            this.MinimumSize = this.Size;
        }
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            DAL.ProductImage productImage = new ProductImage();
            productImage.Search = textBoxSearch.Text;

            try
            {
                productImage.ProductId = Convert.ToInt32(comboBoxProduct.SelectedValue);
            }
            catch (Exception)
            {
            }

            proGrid1.DataSource = productImage.Select().Tables[0];
        }
예제 #4
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            ProductImage pi = new ProductImage();

            pi.Title = txtSearch.Text;

            try
            {
                pi.ProductId = Convert.ToInt32(cmbProduct.SelectedValue);
            }
            catch { }

            if (ucDate1.chkDateSearch.Checked)
            {
                pi.DateSearch = true;
                pi.DateFrom   = ucDate1.DateFrom;
                pi.DateTo     = ucDate1.DateTo;
            }

            dgvImage.DataSource = pi.Select().Tables[0];
        }
 private void textBoxSearch_TextChanged(object sender, EventArgs e)
 {
     DAL.ProductImage productImage = new ProductImage();
     productImage.Search = textBoxSearch.Text;
     proGrid1.DataSource = productImage.Select().Tables[0];
 }