Beispiel #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);

                    }
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// Updates the Page sequence
 /// </summary>
 /// <param name="parentSiteUrl">The parent site URL.</param>
 /// <param name="listName">Name of the list.</param>
 /// <param name="strAuditListName">Name of the STR audit list.</param>
 /// <param name="dvUpdateListitems">The dv update listitems.</param>
 /// <param name="actionPerformed">The action performed.</param>
 public void UpdatepageSequence(string parentSiteUrl, string listName, string strAuditListName,
     DataView dvUpdateListitems, string actionPerformed)
 {
     objCommonDAL = new CommonDAL();
     objMasterDAL = new MasterDAL();
     objCommonDAL.UpdateSequence(parentSiteUrl, listName, dvUpdateListitems, "Page_Sequence");
     if (dvUpdateListitems != null && dvUpdateListitems.Count > 0)
     {
         for (int intIndex = 0; intIndex < dvUpdateListitems.Count; intIndex++)
         {
             objMasterDAL.UpdateListAuditHistory(parentSiteUrl, listName, strAuditListName,
                 int.Parse(dvUpdateListitems[intIndex]["ID"].ToString()), string.Empty, Environment.UserName, actionPerformed);
         }
     }
 }