Exemple #1
0
        /// <summary>
        /// Updates the catalog.
        /// </summary>
        internal void Save()
        {
            DataCommand cmd = ContentDataHelper.CreateDataCommand();

            using (TransactionScope scope = new TransactionScope())
            {
                DataHelper.SaveDataSetSimple(null, cmd, CurrentDto, "Site", "main_GlobalVariables", "SiteLanguage");
                scope.Complete();
            }
        }
Exemple #2
0
        /// <summary>
        /// Loads the specified menu id.
        /// </summary>
        /// <param name="menuId">The menu id.</param>
        internal void Load(int menuId)
        {
            DataCommand cmd = ContentDataHelper.CreateDataCommand("[cms_menu_LoadById]");

            cmd.Parameters = new DataParameters();
            cmd.Parameters.Add(new DataParameter("MenuId", menuId, DataParameterType.Int));

            cmd.DataSet      = this.CurrentDto;
            cmd.TableMapping = Mapping;

            /*DataResult results =*/ DataService.LoadDataSet(cmd);
        }
Exemple #3
0
        /// <summary>
        /// Saves this instance.
        /// </summary>
        internal void Save()
        {
            DataCommand cmd = ContentDataHelper.CreateDataCommand();

            cmd.TableMapping = Mapping2;

            using (TransactionScope scope = new TransactionScope())
            {
                DataHelper.SaveDataSetSimple(null, cmd, CurrentDto, "Menu", "MenuItem", "MenuItem_Resources");
                scope.Complete();
            }
        }
Exemple #4
0
        /// <summary>
        /// Loads the specified site id.
        /// </summary>
        /// <param name="siteId">The site id.</param>
        internal void Load(Guid siteId)
        {
            DataCommand cmd = ContentDataHelper.CreateDataCommand("[cms_menu_LoadBySiteId]");

            cmd.Parameters = new DataParameters();
            cmd.Parameters.Add(new DataParameter("SiteId", siteId, DataParameterType.UniqueIdentifier));

            cmd.DataSet      = this.CurrentDto;
            cmd.TableMapping = Mapping;

            DataService.LoadDataSet(cmd);
        }
Exemple #5
0
        /// <summary>
        /// Loads the specified template id.
        /// </summary>
        /// <param name="templateId">The template id.</param>
        internal void Load(int templateId)
        {
            DataCommand cmd = ContentDataHelper.CreateDataCommand("[cms_TemplatesLoadById]");

            cmd.Parameters = new DataParameters();
            cmd.Parameters.Add(new DataParameter("ApplicationId", CmsConfiguration.Instance.ApplicationId, DataParameterType.UniqueIdentifier));
            cmd.Parameters.Add(new DataParameter("TemplateId", templateId, DataParameterType.Int));

            cmd.DataSet      = this.CurrentDto;
            cmd.TableMapping = DataHelper.MapTables("main_Templates");

            /*DataResult results = */ DataService.LoadDataSet(cmd);
        }
Exemple #6
0
        /// <summary>
        /// Loads the by application.
        /// </summary>
        /// <param name="appId">The app id.</param>
        /// <param name="returnInactive"></param>
        internal void LoadByApplication(Guid appId, bool returnInactive)
        {
            DataCommand cmd = ContentDataHelper.CreateDataCommand();

            cmd.CommandText = String.Format("cms_Site");
            cmd.Parameters  = new DataParameters();
            cmd.Parameters.Add(new DataParameter("ApplicationId", appId, DataParameterType.UniqueIdentifier));
            cmd.Parameters.Add(new DataParameter("ReturnInactive", returnInactive, DataParameterType.Bit));
            cmd.DataSet      = CurrentDto;
            cmd.TableMapping = Mapping;

            DataResult results = DataService.LoadDataSet(cmd);
        }
Exemple #7
0
        /// <summary>
        /// Saves this instance.
        /// </summary>
        internal void Save()
        {
            if (CurrentDto.main_Templates == null)
            {
                return;
            }

            if (CurrentDto.main_Templates.Count == 0)
            {
                return;
            }

            DataCommand cmd = ContentDataHelper.CreateDataCommand();

            using (TransactionScope scope = new TransactionScope())
            {
                DataHelper.SaveDataSetSimple(cmd, CurrentDto, "main_Templates");
                scope.Complete();
            }
        }