private void InitializeFormControls() { this.frmProduct.btnSchEdit.Click += new EventHandler(btnSchEdit_Click); this.frmProduct.btnSchSearch.Click += new EventHandler(btnSchSearch_Click); this.frmProduct.btnSchCreate.Click += new EventHandler(btnSchCreate_Click); this.frmProduct.btnDetSave.Click += new EventHandler(btnDetSave_Click); this.frmProduct.btnDetCancel.Click += new EventHandler(btnDetCancel_Click); this.frmProduct.btnSchClear.Click += new EventHandler(btnSchClear_Click); this.frmProduct.btnSchDelete.Click += new EventHandler(this.btnSchDelete_Click); this.frmProduct.btnSchDelete.Visible = false; this.frmProduct.btnSchCreate.Visible = false; this.frmProduct.btnSchEdit.Text = "Ver Detalle"; this.frmProduct.txtDetDescription.ReadOnly = true; this.frmProduct.txtDetName.ReadOnly = true; ProductBrandParameters pmtProductBrand = new ProductBrandParameters(); this.frmProduct.pbcDetProductBrand.Parameters = pmtProductBrand; this.frmProduct.pbcDetProductBrand.Refresh(); this.frmProduct.pbcDetProductBrand.ReadOnly = true; this.frmProduct.pbcSchProductBrand.Parameters = pmtProductBrand; this.frmProduct.pbcSchProductBrand.Refresh(); this.frmProduct.HiddenDetail(true); this.ClearSearchControls(); }
private void Search() { ProductBrandParameters pmtProductBrand = new ProductBrandParameters(); pmtProductBrand.Name = "%" + this.frmProductBrand.txtSchName.Text + "%"; DataTable dtProductBrands = srvProductBrand.SearchByParameters(pmtProductBrand); this.frmProductBrand.grdSchSearch.DataSource = null; this.frmProductBrand.grdSchSearch.DataSource = dtProductBrands; }