DesktopModules\Store\Catalog\Providers\DataProviders\SqlDataProvider\SqlDataProvider.cs
Add these methods
DesktopModules\Store\Catalog\ModuleSettings.cs
Change Public methods Like this.
Add this Region with other settings. (ModuleSettings.cs)
ProductController.cs
Add these methods
Add these methods
public override IDataReader GetPortalMYSEARCHProducts(int PortalID, bool Archived, string SearchText, string SearchField) { return SqlHelper.ExecuteReader(ConnectionString, DatabaseOwner + ObjectQualifier + "Store_Products_GetPortalMYSEARCHProducts", PortalID, Archived,SearchText,SearchField); } public override IDataReader GetMYSEARCHProducts(int CategoryID, bool Archived, string SearchText, string SearchField) { return SqlHelper.ExecuteReader(ConnectionString, DatabaseOwner + ObjectQualifier + "Store_Products_GetMYSEARCHProducts", CategoryID, Archived,SearchText,SearchField); }
DesktopModules\Store\Catalog\ModuleSettings.cs
Change Public methods Like this.
public class ModuleSettings { public GeneralSettings General; public NewProductsSettings NewProducts; public FeaturedProductsSettings FeaturedProducts; public MYSEARCHProductsSettings MYSEARCHProducts; public PopularProductsSettings PopularProducts; public CategoryProductsSettings CategoryProducts; public ProductDetailSettings ProductDetail; public CategoryMenuSettings CategoryMenu; public ModuleSettings(int moduleId, int tabId) { General = new GeneralSettings(moduleId, tabId); NewProducts = new NewProductsSettings(moduleId, tabId); FeaturedProducts = new FeaturedProductsSettings(moduleId, tabId); MYSEARCHProducts = new MYSEARCHProductsSettings(moduleId, tabId); PopularProducts = new PopularProductsSettings(moduleId, tabId); CategoryProducts = new CategoryProductsSettings(moduleId, tabId); ProductDetail = new ProductDetailSettings(moduleId, tabId); CategoryMenu = new CategoryMenuSettings(moduleId, tabId); } }
Add this Region with other settings. (ModuleSettings.cs)
#region MYSEARCH Product Settings public class MYSEARCHProductsSettings : SettingsWrapper { [ModuleSetting("mslcontainertemplate", "ListContainer.htm")] public string ContainerTemplate { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } [ModuleSetting("msltemplate", "MYSEARCHProduct.htm")] public string Template { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } [ModuleSetting("mslrowcount", "10")] public string RowCount { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } [ModuleSetting("mslcolumncount", "2")] public string ColumnCount { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } [ModuleSetting("mslcolumnwidth", "200")] public string ColumnWidth { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } [ModuleSetting("mslrepeatdirection", "H")] public string RepeatDirection { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } [ModuleSetting("mslshowthumbnail", "true")] public string ShowThumbnail { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } [ModuleSetting("mslthumbnailwidth", "90")] public string ThumbnailWidth { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } [ModuleSetting("msldetailtabid", "0")] public string DetailPage { [MethodImpl(MethodImplOptions.NoInlining)] get { MethodBase m = MethodBase.GetCurrentMethod(); return getSetting(m); } [MethodImpl(MethodImplOptions.NoInlining)] set { MethodBase m = MethodBase.GetCurrentMethod(); setSetting(m, value); } } public MYSEARCHProductsSettings(int moduleId, int tabId): base(moduleId, tabId) { } } #endregion
ProductController.cs
Add these methods
public ArrayList GetPortalMYSEARCHProducts(int portalID, bool archived, string SearchText, string SearchField) { return CBO.FillCollection(DataProvider.Instance().GetPortalMYSEARCHProducts(portalID, archived,SearchText,SearchField), typeof(ProductInfo)); } public ArrayList GetMYSEARCHProducts(int categoryID, bool archived, string SearchText, string SearchField) { return CBO.FillCollection(DataProvider.Instance().GetMYSEARCHProducts(categoryID, archived,SearchText,SearchField), typeof(ProductInfo)); }Continue - Part 5
0 Response to "dotnetnuke store product search module - part 4"
Post a Comment