Exemple #1
0
        /// <summary>
        /// Performs update of master page zones given submitted form data.
        /// </summary>
        /// <param name="form">Form containing updated master page zones data.</param>
        /// <returns>Result of form post.</returns>
        private FormResult UpdateMasterPageZones(Form form)
        {
            // Get master page details
            string[] parts        = form.Context.Split('|');
            long     tenantId     = _authenticationService.TenantId;
            long     masterPageId = Convert.ToInt64(parts[0]);
            List <MasterPageZone> masterPageZones = JsonConvert.DeserializeObject <List <MasterPageZone> >(form.Data);

            // Do the update
            _masterPageService.UpdateZones(tenantId, masterPageId, masterPageZones);

            // Return form result with no errors
            return(_formHelperService.GetFormResult());
        }