private void InitializeControlControls() { if (LicenseManager.UsageMode != LicenseUsageMode.Designtime) { PrinterBrandParameters pmtPrinterBrand = new PrinterBrandParameters(); this.controlCustomerInfrastructurePrinters.pbcPrinterBrand.Parameters = pmtPrinterBrand; this.controlCustomerInfrastructurePrinters.pbcPrinterBrand.Refresh(); PrinterTypeParameters pmtPrinterType = new PrinterTypeParameters(); this.controlCustomerInfrastructurePrinters.ptcPrinterType.Parameters = pmtPrinterType; this.controlCustomerInfrastructurePrinters.ptcPrinterType.Refresh(); CustomerInfrastructurePrinterClassificationParameters pmtCustomerInfrastructurePrinterClassification = new CustomerInfrastructurePrinterClassificationParameters(); this.controlCustomerInfrastructurePrinters.cipccCustomerInfrastructurePrinterClassification .Parameters = pmtCustomerInfrastructurePrinterClassification; this.controlCustomerInfrastructurePrinters.cipccCustomerInfrastructurePrinterClassification.Refresh(); this.controlCustomerInfrastructurePrinters .cipccCustomerInfrastructurePrinterClassification.ValueChanged += new Base.Controls.EventsHandlers.SamsaraEntityChooserValueChangedEventHandler <CustomerInfrastructurePrinterClassification> (cipccCustomerInfrastructurePrinterClassification_ValueChanged); this.controlCustomerInfrastructurePrinters.grdRelations.InitializeLayout += new InitializeLayoutEventHandler(grdRelations_InitializeLayout); } }
private void Search() { PrinterTypeParameters pmtPrinterType = new PrinterTypeParameters(); pmtPrinterType.Name = "%" + this.frmPrinterType.txtSchName.Text + "%"; DataTable dtPrinterTypes = srvPrinterType.SearchByParameters(pmtPrinterType); this.frmPrinterType.grdSchSearch.DataSource = null; this.frmPrinterType.grdSchSearch.DataSource = dtPrinterTypes; }
private void grdRelations_InitializeLayout(object sender, InitializeLayoutEventArgs e) { UltraGridBand band = e.Layout.Bands[0]; band.Override.AllowUpdate = DefaultableBoolean.False; PrinterBrandParameters pmtPrinterBrand = new PrinterBrandParameters(); IList <PrinterBrand> printerBrands = this.srvPrinterBrand.GetListByParameters(pmtPrinterBrand); WindowsFormsUtil.SetUltraGridValueList(e.Layout, printerBrands, band.Columns["PrinterBrandId"], "PrinterBrandId", "Name", "Seleccione"); PrinterTypeParameters pmtPrinterType = new PrinterTypeParameters(); IList <PrinterType> printerTypes = this.srvPrinterType.GetListByParameters(pmtPrinterType); WindowsFormsUtil.SetUltraGridValueList(e.Layout, printerTypes, band.Columns["PrinterTypeId"], "PrinterTypeId", "Name", "Seleccione"); }