private void Search() { CommutatorBrandParameters pmtCommutatorBrand = new CommutatorBrandParameters(); pmtCommutatorBrand.Name = "%" + this.frmCommutatorBrand.txtSchName.Text + "%"; DataTable dtCommutatorBrands = srvCommutatorBrand.SearchByParameters(pmtCommutatorBrand); this.frmCommutatorBrand.grdSchSearch.DataSource = null; this.frmCommutatorBrand.grdSchSearch.DataSource = dtCommutatorBrands; }
private void InitializeControlControls() { if (LicenseManager.UsageMode != LicenseUsageMode.Designtime) { CommutatorBrandParameters pmtCommutatorBrand = new CommutatorBrandParameters(); this.controlCustomerInfrastructureNetworkCommutators.cbcCommutatorBrand.Parameters = pmtCommutatorBrand; this.controlCustomerInfrastructureNetworkCommutators.cbcCommutatorBrand.Refresh(); CommutatorTypeParameters pmtCommutatorType = new CommutatorTypeParameters(); this.controlCustomerInfrastructureNetworkCommutators.ctcCommutatorType.Parameters = pmtCommutatorType; this.controlCustomerInfrastructureNetworkCommutators.ctcCommutatorType.Refresh(); this.controlCustomerInfrastructureNetworkCommutators.grdRelations.InitializeLayout += new InitializeLayoutEventHandler(grdRelations_InitializeLayout); } }
private void grdRelations_InitializeLayout(object sender, InitializeLayoutEventArgs e) { UltraGridBand band = e.Layout.Bands[0]; band.Override.AllowUpdate = DefaultableBoolean.False; CommutatorBrandParameters pmtCommutatorBrand = new CommutatorBrandParameters(); IList <CommutatorBrand> cctvBrands = this.srvCommutatorBrand.GetListByParameters(pmtCommutatorBrand); WindowsFormsUtil.SetUltraGridValueList(e.Layout, cctvBrands, band.Columns["CommutatorBrandId"], "CommutatorBrandId", "Name", "Seleccione"); CommutatorTypeParameters pmtCommutatorType = new CommutatorTypeParameters(); this.controlCustomerInfrastructureNetworkCommutators.ctcCommutatorType.Parameters = pmtCommutatorType; this.controlCustomerInfrastructureNetworkCommutators.ctcCommutatorType.Refresh(); IList <CommutatorType> cctvTypes = this.srvCommutatorType.GetListByParameters(pmtCommutatorType); WindowsFormsUtil.SetUltraGridValueList(e.Layout, cctvTypes, band.Columns["CommutatorTypeId"], "CommutatorTypeId", "Name", "Seleccione"); }