/// <summary> /// /// </summary> public FieldContainer.Builder FieldContainer(FieldContainer component) { #if MVC component.ViewContext = this.HtmlHelper != null ? this.HtmlHelper.ViewContext : null; #endif return(new FieldContainer.Builder(component)); }
private static IList<AbstractComponent> CreaAtributos(IEnumerable<dynamic> listaAtributos, int id_origen, int id_tabla_maestra, ResultadoSapData res=null) { try { int cont = 0; IList<AbstractComponent> latributos = new List<AbstractComponent>(); IEnumerable<dynamic> enumerable = listaAtributos as IList<dynamic> ?? listaAtributos.ToList(); if (enumerable.Any()) { FieldContainer container = new FieldContainer(); container.Layout = "HBoxLayout"; container.ID = "cnt" + DateTime.Now.Ticks+ generateID(); foreach (var atributo in enumerable) { if (cont == MAXIMO_FILA) { cont = 0; latributos.Add(container); container = new FieldContainer(); container.Layout = "HBoxLayout"; container.ID = "cnt" + DateTime.Now.Ticks+ generateID(); } FactoryAtributos fabricaAtributos = null; if (res == null) { fabricaAtributos = new FactoryAtributos(atributo.tida_Tconstante, atributo, id_origen, id_tabla_maestra); }else { fabricaAtributos = new FactoryAtributos(atributo.tida_Tconstante, atributo, id_origen, id_tabla_maestra,res); } container.Items.Add(fabricaAtributos.CrearAtributo()); cont++; } if (cont <= MAXIMO_FILA) { latributos.Add(container); } } return latributos; } catch (Exception ex) { throw new Exception(ex.Message); } }
/// <summary> /// /// </summary> public FieldContainer.Builder FieldContainer(FieldContainer component) { return(new FieldContainer.Builder(component)); }