Ejemplo n.º 1
0
        /// <summary>
        /// Updates the list entry.
        /// </summary>
        /// <param name="siteURL">The site URL.</param>
        /// <param name="listEntry">The list entry.</param>
        /// <param name="auditListName">Name of the audit list.</param>
        /// <param name="listName">Name of the list.</param>
        /// <param name="userName">Name of the user.</param>
        /// <param name="actionPerformed">The action performed.</param>
        public void UpdateListEntry(string siteURL, ListEntry listEntry, string auditListName, string listName, string userName, string actionPerformed)
        {
            objMasterDAL = new MasterDAL();
            objCommonDAL = new CommonDAL();
            string[] strTemplateIds = null;
            string strTemplatemappingRowId = string.Empty;
            objMasterDAL.UpdateListEntry(siteURL, listEntry, listName, actionPerformed);
            if (listEntry.MasterPage.RowId > 0)
            {
                objMasterDAL.UpdateListAuditHistory(siteURL, listName, auditListName, listEntry.MasterPage.RowId, listEntry.MasterPage.Name,
                    userName, actionPerformed);
            }

            if (!string.IsNullOrEmpty(listEntry.MasterPage.Templates) && actionPerformed.Contains(AUDIT_ACTION_CREATION))
            {
                strTemplatemappingRowId = objMasterDAL.AddTemplateMasterPageMapping(siteURL, listEntry, TEMPLATEPAGESMAPPINGLIST);
                strTemplateIds = strTemplatemappingRowId.Split(';');
                if (strTemplateIds != null)
                {
                    for (int intIndex = 0; intIndex < strTemplateIds.Length - 1; intIndex++)
                    {
                        int intRowId = 0;
                        int.TryParse(strTemplateIds[intIndex], out intRowId);
                        objCommonDAL.UpdateListTemplateMappingAuditHistory(siteURL, TEMPLATEPAGESMAPPINGAUDITLIST, intRowId, userName, AUDIT_ACTION_CREATION);

                    }
                }
            }
        }