public static IEnumerable <IBindableListControl> GetParents(this IBindableListControl control) { var names = (control.ParentControls ?? string.Empty).Split(','); var asControl = control as Control; return(names.Select(id => asControl.GetControlOnPage(id.Trim()) as IBindableListControl).Where(b => b != null)); }
public override void DataBind(IBindableListControl control) { var empresas = DaoFactory.EmpresaDAO.GetList(); foreach (var empresa in empresas) { control.AddItem(empresa.RazonSocial, empresa.Id); } }
public override void DataBind(IBindableListControl control) { var empresas = control.GetParentSelected(BindEntities.Empresa); var lineas = DaoFactory.LineaDAO.GetList(empresas); foreach (var linea in lineas) { control.AddItem(linea.Descripcion, linea.Id); } }
public BindableListControlBase(IBindableListControl control) { Control = control; var ctrl = Control as Control; EntityProperty = ctrl.CreateVsProperty("Entity", BindEntities.Empresa); AddAllItemProperty = ctrl.CreateVsProperty("AddAllItem", false); AddNoneItemProperty = ctrl.CreateVsProperty("AddNoneItem", false); ParentControlsProperty = ctrl.CreateVsProperty("ParentControls", string.Empty); SelectedValuesProperty = ctrl.CreateVsProperty("SelectedValues", new int[0] as IEnumerable <int>); }
public void RegisterChild(IBindableListControl control) { Control.RegisterChild(control); }
public abstract void DataBind(IBindableListControl control);