public P2PWidget AddWidget(int WidgetID, int ContainerID, string Locked, string Properties, int SortOrder, string P2PWidgetTypeID, bool IsRequired, string IsVisible, string VisibilityConditionTypeID) { P2PWidget widget = new P2PWidget { WidgetID = WidgetID, ContainerID = ContainerID, Locked = Locked, Properties = Properties, SortOrder = SortOrder, P2PWidgetTypeID = P2PWidgetTypeID, IsRequired = IsRequired, IsVisible = IsVisible, VisibilityConditionTypeID = VisibilityConditionTypeID }; return(widget); }
public WidgetServicio() { widgetsRepository = new WidgetRepository(); _widgetsList = new List <P2PWidget>(); _widgetsListByContainer = new List <P2PWidget>(); P2PWidget widget1 = widgetsRepository.AddWidget(1, 2, "y", "{test : 1}", 1, "Donation", true, "y", "n"); P2PWidget widget2 = widgetsRepository.AddWidget(2, 9, "y", "{test : 2}", 1, "Event", false, "y", "n"); P2PWidget widget3 = widgetsRepository.AddWidget(3, 10, "n", "{test : 3}", 1, "Donation", false, "y", "y"); P2PWidget widget4 = widgetsRepository.AddWidget(4, 8, "y", "{test : 4}", 1, "Event", true, "y", "n"); P2PWidget widget5 = widgetsRepository.AddWidget(5, 2, "n", "{test : 5}", 1, "DonationThankYou", true, "y", "n"); _widgetsList.Add(widget1); _widgetsList.Add(widget2); _widgetsList.Add(widget3); _widgetsList.Add(widget4); _widgetsList.Add(widget5); _widgetsListByContainer.Add(widget1); _widgetsListByContainer.Add(widget5); }