public void ExecuteOnUnInstallation(XmlDocument doc)
        {
            ModuleSinglePageInfo mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxCompareItems";
            mpi.FriendlyName = "AspxCompareItemsDetails";
            mpi.PageName = "Compare Item List";
            mpi.PageTitle = "Compare Item List";
            mpi.Description = "Compare Items Module Description";

            PageControlInfo pci = new PageControlInfo();
            List<PageControlInfo> pciList = new List<PageControlInfo>();
            pci.ControlSource = "Modules/AspxCommerce/AspxCompareItems/ItemCompareDetails.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxCompareItems/ItemsCompareSetting.ascx";
            pci.ControlType = "Setting";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;

            CreateModulePackage cmp = new CreateModulePackage();
            cmp.DeleteSinglePageModulePackage(mpi);
        }
        public void ExecuteOnInstallation(XmlDocument doc, string tempFolderPath)
        {
            RegisterAPIjs(doc, tempFolderPath);
            ModuleSinglePageInfo mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxWishList";
            mpi.FriendlyName = "AspxWishItems";
            mpi.PageName = "My WishList";
            mpi.PageTitle = "MyWishList";
            mpi.Description = "Wish Items Module Description";

            PageControlInfo pci = new PageControlInfo();
            List<PageControlInfo> pciList = new List<PageControlInfo>();
            pci.ControlSource = "Modules/AspxCommerce/AspxWishList/WishItemList.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxWishList/WishItemsSetting.ascx";
            pci.ControlType = "Setting";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;

            CreateModulePackage cmp = new CreateModulePackage();
            cmp.CreateSinglePagesModulePackage(mpi);
        }
        public void ExecuteOnUnInstallation(XmlDocument doc)
        {
            DeleteRegisteredAPIjs(doc);
            ModuleSinglePageInfo mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxAdvanceSearch";
            mpi.FriendlyName = "AspxAdvanceSearch";
            mpi.PageName = "AdvanceSearch";
            mpi.PageTitle = "AdvanceSearch";
            mpi.Description = "AdvanceSearch Module Description";
            PageControlInfo pci = new PageControlInfo();
            List<PageControlInfo> pciList = new List<PageControlInfo>();
            pci.ControlSource = "Modules/AspxCommerce/AspxAdvanceSearch/AdvanceSearch.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxAdvanceSearch/AdvanceSearchSetting.ascx";
            pci.ControlType = "Setting";
            pciList.Add(pci);
            mpi.PageControls = pciList;           
            mpi.HelpURL = "http://www.sageframe.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false; ;

            CreateModulePackage cmp = new CreateModulePackage();
            cmp.DeleteSinglePageModulePackage(mpi);
        }
Пример #4
0
 public void DeleteSinglePageModulePackage(ModuleSinglePageInfo pageObj)
 {
     try
     {
         List <KeyValuePair <string, object> > paramColl = new List <KeyValuePair <string, object> >();
         paramColl.Add(new KeyValuePair <string, object>("@FriendlyName", pageObj.FriendlyName));
         paramColl.Add(new KeyValuePair <string, object>("@PageName", pageObj.PageName));
         paramColl.Add(new KeyValuePair <string, object>("@PortalID", GetPortalID));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_DeletePageModulePackage]", paramColl);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
        public void ExecuteOnUnInstallation(XmlDocument doc)
        {          

            ModuleSinglePageInfo mpi = new ModuleSinglePageInfo();

            List<ModuleSinglePageInfo> multiplePageInfo = new List<ModuleSinglePageInfo>();

            mpi.FolderName = "AspxCommerce/AspxBrandView";
            mpi.FriendlyName = "AspxBrandViewAll";
            mpi.PageName = "Brands";
            mpi.PageTitle = "Brands";
            mpi.Description = "Display All Brand Page";
            List<PageControlInfo> pciList = new List<PageControlInfo>();
            PageControlInfo pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxBrandView/BrandView.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;
            multiplePageInfo.Add(mpi);


            mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxBrandView";
            mpi.FriendlyName = "AspxBrandRssView";
            mpi.PageName = "Brand Rss";
            mpi.PageTitle = "Brand Rss";
            mpi.Description = "Brand Rss View";
            pciList = new List<PageControlInfo>();
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxBrandView/BrandRss.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;

            multiplePageInfo.Add(mpi);
            CreateModulePackage cmp = new CreateModulePackage();
            cmp.DeleteMultiplePageModulePackage(multiplePageInfo);// for multiple Page module package

        }
        public void ExecuteOnInstallation(XmlDocument doc, string tempFolderPath)
        {
            ModuleSinglePageInfo mpi = new ModuleSinglePageInfo();
            List<ModuleSinglePageInfo> multiplePageInfo = new List<ModuleSinglePageInfo>();

            mpi.FolderName = "AspxCommerce/AspxSpecialsItems";
            mpi.FriendlyName = "AspxSpecialItemsDetail";
            mpi.PageName = "SpecialDetail";
            mpi.PageTitle = "SpecialDetail";
            mpi.Description = "Display All Special Items";
            PageControlInfo pci = new PageControlInfo();
            List<PageControlInfo> pciList = new List<PageControlInfo>();
            pci.ControlSource = "Modules/AspxCommerce/AspxSpecialsItems/SpecialItemsViewAll.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.50.00";
            mpi.SupportPartialRendering = false;

            multiplePageInfo.Add(mpi);


            mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxSpecialsItems";
            mpi.FriendlyName = "SpecialItemsRssFeed";
            mpi.PageName = "SpecialRss";
            mpi.PageTitle = "SpecialRss";
            mpi.Description = "Heavy Discount Rss Feed View";
            pci = new PageControlInfo();
            pciList = new List<PageControlInfo>();
            pci.ControlSource = "Modules/AspxCommerce/AspxSpecialsItems/SpecialItemsRss.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.50.00";
            mpi.SupportPartialRendering = false;

            multiplePageInfo.Add(mpi);
            CreateModulePackage cmp = new CreateModulePackage();

            cmp.CreateMultiplePagesModulePackage(multiplePageInfo);// for multiple page

        }
Пример #7
0
        public void CreateSinglePagesModulePackage(ModuleSinglePageInfo pageObj)
        {
            ModuleController moduleCtr = new ModuleController();
            // PaymentGateWayModuleInfo module = new PaymentGateWayModuleInfo();
            ModuleInfo module            = new ModuleInfo();
            SQLHandler sqlH              = new SQLHandler();
            Int32?     newModuleID       = 0;
            Int32?     newModuleDefID    = 0;
            Int32?     newPortalmoduleID = 0;

            if (!IsPageExists(pageObj.PageName))
            {
                try
                {
                    #region "Module Creation Logic"

                    // add into module table
                    ModuleInfo moduleObj = new ModuleInfo();
                    moduleObj.ModuleName              = "AspxCommerce." + pageObj.FriendlyName;
                    moduleObj.Name                    = pageObj.FriendlyName;
                    moduleObj.PackageType             = "Module";
                    moduleObj.Owner                   = "AspxCommerce";
                    moduleObj.Organization            = "";
                    moduleObj.URL                     = "";
                    moduleObj.Email                   = "";
                    moduleObj.ReleaseNotes            = "";
                    moduleObj.FriendlyName            = pageObj.FriendlyName;
                    moduleObj.Description             = pageObj.Description;
                    moduleObj.Version                 = pageObj.Version;
                    moduleObj.isPremium               = true;
                    moduleObj.BusinessControllerClass = "";
                    moduleObj.FolderName              = pageObj.FolderName;
                    moduleObj.supportedFeatures       = 0;
                    moduleObj.CompatibleVersions      = "";
                    moduleObj.dependencies            = "";
                    moduleObj.permissions             = "";


                    int[] outputValue;
                    outputValue           = moduleCtr.AddModules(moduleObj, false, 0, true, DateTime.Now, GetPortalID, GetUsername);
                    moduleObj.ModuleID    = outputValue[0];
                    moduleObj.ModuleDefID = outputValue[1];
                    newModuleID           = moduleObj.ModuleID;
                    newModuleDefID        = moduleObj.ModuleDefID;


                    //insert into ProtalModule table

                    newPortalmoduleID = moduleCtr.AddPortalModules(GetPortalID, newModuleID, true, DateTime.Now, GetUsername);
                    #endregion

                    //install permission for the installed module in ModuleDefPermission table with ModuleDefID and PermissionID
                    //int controlType = 0;
                    //controlType = checkControlType(pageObj.ControlType);
                    string IconFile = "";


                    foreach (var item in pageObj.PageControls)
                    {
                        int controlType = 0;
                        controlType = checkControlType(item.ControlType);
                        //add into module control table
                        moduleCtr.AddModuleCoontrols(newModuleDefID, pageObj.PageName + item.ControlType,
                                                     pageObj.PageTitle + item.ControlType, item.ControlSource,
                                                     IconFile, controlType, 0, pageObj.HelpURL,
                                                     pageObj.SupportPartialRendering, true,
                                                     DateTime.Now,
                                                     GetPortalID, GetUsername);
                    }


                    //sp_ModuleDefPermissionAdd
                    string ModuleDefPermissionID;
                    List <KeyValuePair <string, object> > paramDef = new List <KeyValuePair <string, object> >();
                    paramDef.Add(new KeyValuePair <string, object>("@ModuleDefID", newModuleDefID));
                    paramDef.Add(new KeyValuePair <string, object>("@PortalModuleID", newPortalmoduleID));
                    paramDef.Add(new KeyValuePair <string, object>("@PermissionID", 1));
                    paramDef.Add(new KeyValuePair <string, object>("@IsActive", true));
                    paramDef.Add(new KeyValuePair <string, object>("@AddedOn", DateTime.Now));
                    paramDef.Add(new KeyValuePair <string, object>("@PortalID", GetPortalID));
                    paramDef.Add(new KeyValuePair <string, object>("@AddedBy", GetUsername));
                    ModuleDefPermissionID = sqlH.ExecuteNonQueryAsGivenType <string>("[dbo].[sp_ModuleDefPermissionAdd]", paramDef, "@ModuleDefPermissionID");

                    //ModuleDefPermissionID
                    List <KeyValuePair <string, object> > paramPage = new List <KeyValuePair <string, object> >();
                    paramPage.Add(new KeyValuePair <string, object>("@ModuleDefID", newModuleDefID));
                    paramPage.Add(new KeyValuePair <string, object>("@PageName", pageObj.PageName));
                    paramPage.Add(new KeyValuePair <string, object>("@PortalID", GetPortalID));
                    paramPage.Add(new KeyValuePair <string, object>("@ModuleDefPermissionID", int.Parse(ModuleDefPermissionID)));
                    sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_CreatePageModulePackage]", paramPage);
                }
                catch (Exception ex)
                {
                    ProcessException(ex);
                }
            }
        }
        public void CreateSinglePagesModulePackage(ModuleSinglePageInfo pageObj)
        {
            ModuleController moduleCtr = new ModuleController();
            // PaymentGateWayModuleInfo module = new PaymentGateWayModuleInfo();
            ModuleInfo module = new ModuleInfo();
            SQLHandler sqlH = new SQLHandler();
            Int32? newModuleID = 0;
            Int32? newModuleDefID = 0;
            Int32? newPortalmoduleID = 0;

            if (!IsPageExists(pageObj.PageName))
            {
                try
                {
                    #region "Module Creation Logic"

                    // add into module table
                    ModuleInfo moduleObj = new ModuleInfo();
                    moduleObj.ModuleName = "AspxCommerce." + pageObj.FriendlyName;
                    moduleObj.Name = pageObj.FriendlyName;
                    moduleObj.PackageType = "Module";
                    moduleObj.Owner = "AspxCommerce";
                    moduleObj.Organization = "";
                    moduleObj.URL = "";
                    moduleObj.Email = "";
                    moduleObj.ReleaseNotes = "";
                    moduleObj.FriendlyName = pageObj.FriendlyName;
                    moduleObj.Description = pageObj.Description;
                    moduleObj.Version = pageObj.Version;
                    moduleObj.isPremium = true;
                    moduleObj.BusinessControllerClass = "";
                    moduleObj.FolderName = pageObj.FolderName;
                    moduleObj.supportedFeatures = 0;
                    moduleObj.CompatibleVersions = "";
                    moduleObj.dependencies = "";
                    moduleObj.permissions = "";
              

                        int[] outputValue;
                        outputValue = moduleCtr.AddModules(moduleObj, false, 0, true, DateTime.Now, GetPortalID, GetUsername);
                        moduleObj.ModuleID = outputValue[0];
                        moduleObj.ModuleDefID = outputValue[1];
                        newModuleID = moduleObj.ModuleID;
                        newModuleDefID = moduleObj.ModuleDefID;


                        //insert into ProtalModule table

                        newPortalmoduleID = moduleCtr.AddPortalModules(GetPortalID, newModuleID, true, DateTime.Now, GetUsername);
                    #endregion

                        //install permission for the installed module in ModuleDefPermission table with ModuleDefID and PermissionID
                        //int controlType = 0;
                        //controlType = checkControlType(pageObj.ControlType);
                        string IconFile = "";


                        foreach (var item in pageObj.PageControls)
                        {
                            int controlType = 0;
                            controlType = checkControlType(item.ControlType);
                            //add into module control table
                            moduleCtr.AddModuleCoontrols(newModuleDefID, pageObj.PageName + item.ControlType,
                                                               pageObj.PageTitle + item.ControlType, item.ControlSource,
                                                               IconFile, controlType, 0, pageObj.HelpURL,
                                                               pageObj.SupportPartialRendering, true,
                                                               DateTime.Now,
                                                               GetPortalID, GetUsername);
                        }
                   

                    //sp_ModuleDefPermissionAdd
                    string ModuleDefPermissionID;
                    List<KeyValuePair<string, object>> paramDef = new List<KeyValuePair<string, object>>();
                    paramDef.Add(new KeyValuePair<string, object>("@ModuleDefID", newModuleDefID));
                    paramDef.Add(new KeyValuePair<string, object>("@PortalModuleID", newPortalmoduleID));
                    paramDef.Add(new KeyValuePair<string, object>("@PermissionID", 1));
                    paramDef.Add(new KeyValuePair<string, object>("@IsActive", true));
                    paramDef.Add(new KeyValuePair<string, object>("@AddedOn", DateTime.Now));
                    paramDef.Add(new KeyValuePair<string, object>("@PortalID", GetPortalID));
                    paramDef.Add(new KeyValuePair<string, object>("@AddedBy", GetUsername));
                    ModuleDefPermissionID = sqlH.ExecuteNonQueryAsGivenType<string>("[dbo].[sp_ModuleDefPermissionAdd]", paramDef, "@ModuleDefPermissionID");

                    //ModuleDefPermissionID
                    List<KeyValuePair<string, object>> paramPage = new List<KeyValuePair<string, object>>();
                    paramPage.Add(new KeyValuePair<string, object>("@ModuleDefID", newModuleDefID));
                    paramPage.Add(new KeyValuePair<string, object>("@PageName", pageObj.PageName));
                    paramPage.Add(new KeyValuePair<string, object>("@PortalID", GetPortalID));
                    paramPage.Add(new KeyValuePair<string, object>("@ModuleDefPermissionID", int.Parse(ModuleDefPermissionID)));
                    sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_CreatePageModulePackage]", paramPage);

                }
                catch (Exception ex)
                {

                    ProcessException(ex);
                }
            }
        }
        public void DeleteSinglePageModulePackage(ModuleSinglePageInfo pageObj)
        {
            try
            {
                List<KeyValuePair<string, object>> paramColl = new List<KeyValuePair<string, object>>();
                paramColl.Add(new KeyValuePair<string, object>("@FriendlyName", pageObj.FriendlyName));
                paramColl.Add(new KeyValuePair<string, object>("@PageName", pageObj.PageName));
                paramColl.Add(new KeyValuePair<string, object>("@PortalID", GetPortalID));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_DeletePageModulePackage]", paramColl);

            }
            catch (Exception ex)
            {
                ProcessException(ex);
            }
        }
        public void ExecuteOnUnInstallation(XmlDocument doc)
        { 
            ModuleSinglePageInfo mpi = new ModuleSinglePageInfo();

            List<ModuleSinglePageInfo> multiplePageInfo = new List<ModuleSinglePageInfo>();

            mpi.FolderName = "AspxCommerce/AspxServiceItems";
            mpi.FriendlyName = "AspxServiceViewAll";
            mpi.PageName = "Services";
            mpi.PageTitle = "Services";
            mpi.Description = "View All Services";
            List<PageControlInfo> pciList = new List<PageControlInfo>();
            PageControlInfo pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxServiceItems/ServicesAll.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;

            multiplePageInfo.Add(mpi);

            mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxServiceItems";
            mpi.FriendlyName = "AspxServiceItemDetails";
            mpi.PageName = "Service Item Details";
            mpi.PageTitle = "Service Item Details";
            mpi.Description = "Display Service Item Details";
            pciList = new List<PageControlInfo>();
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxServiceItems/ServiceItemDetails.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;
            multiplePageInfo.Add(mpi);

            mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxServiceItems";
            mpi.FriendlyName = "AspxBookAnAppointment";
            mpi.PageName = "Book An Appointment";
            mpi.PageTitle = "Book An Appointment";
            mpi.Description = "Book An Appointment";
            pciList = new List<PageControlInfo>();
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxServiceItems/BookAppointment.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;

            multiplePageInfo.Add(mpi);

            mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxServiceItems";
            mpi.FriendlyName = "AspxAppointmentSuccess";
            mpi.PageName = "Appointment Success";
            mpi.PageTitle = "Appointment Success";
            mpi.Description = "Appointment Success";
            pciList = new List<PageControlInfo>();
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxServiceItems/AppointmentSuccess.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;
            multiplePageInfo.Add(mpi);

            mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxServiceItems";
            mpi.FriendlyName = "AspxServiceItemRss";
            mpi.PageName = "Service Rss";
            mpi.PageTitle = "Service Rss";
            mpi.Description = "Service Rss";
            pciList = new List<PageControlInfo>();
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxServiceItems/ServiceItemRss.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;
            multiplePageInfo.Add(mpi);

            mpi = new ModuleSinglePageInfo();
            mpi.FolderName = "AspxCommerce/AspxServiceItems";
            mpi.FriendlyName = "AspxServiceDetails";
            mpi.PageName = "Service Details";
            mpi.PageTitle = "Service Details";
            mpi.Description = "Service Details";
            pciList = new List<PageControlInfo>();
            pci = new PageControlInfo();
            pci.ControlSource = "Modules/AspxCommerce/AspxServiceItems/ServicesDetails.ascx";
            pci.ControlType = "View";
            pciList.Add(pci);
            mpi.PageControls = pciList;
            mpi.HelpURL = "http://www.aspxcommerce.com/default.aspx";
            mpi.Version = "02.05.00";
            mpi.SupportPartialRendering = false;
            multiplePageInfo.Add(mpi);
            CreateModulePackage cmp = new CreateModulePackage();   
            cmp.DeleteMultiplePageModulePackage(multiplePageInfo);// for multiple Page module package

        }