Пример #1
0
        /// <summary>
        /// Gets the list of items based on the CAML query and the fields to view. 
        /// </summary>
        /// <param name="strListName"></param>
        /// <param name="strCamlQuery"></param>
        /// <param name="strFieldsView"></param>
        /// <returns></returns>
        protected void UpdateListItemSequence(string strListName, DataView dvUpdatedListItem,
            string strAuditListName, string strActionPerformed, string pageType)
        {
            CommonUtility objCommonUtility; ;
            try
            {
                switch (pageType)
                {
                    case MASTERPAGE:
                    case CHAPTERPAGEMAPPING:
                        objMasterBLL = new MasterPageBLL();
                        objMasterBLL.UpdatepageSequence(strParentSiteURL, strListName, strAuditListName,
                            dvUpdatedListItem, strActionPerformed);

                        break;
                    case CHAPTER:
                        objChapterBLL = new ChapterBLL();
                        objCommonUtility = new CommonUtility();
                        objChapterBLL.UpdateChapterSequence(strParentSiteURL, strListName, strAuditListName,
                            dvUpdatedListItem, strActionPerformed, objCommonUtility.GetUserName());
                        break;
                    case TEMPLATEPAGESSEQUENCE:
                        {
                            objTemplateBLL = new TemplateDetailBLL();
                            objCommonUtility = new CommonUtility();
                            objTemplateBLL.UpdatePageSequence(strParentSiteURL, strListName, strAuditListName, strActionPerformed, objCommonUtility.GetUserName(), dvUpdatedListItem);
                            break;
                        }

                }

            }
            catch
            { throw; }
        }
Пример #2
0
        /// <summary>
        /// Gets the details for selected ID.
        /// </summary>
        /// <param name="selectedID">The selected ID.</param>
        /// <param name="listName">Name of the list.</param>
        /// <param name="pageType">Type of the page.</param>
        /// <returns></returns>
        protected DWBDataObjects.ListEntry GetDetailsForSelectedID(string selectedID, string listName, string pageType)
        {
            string strQueryString;
            DWBDataObjects.ListEntry objListEntry = null;
            try
            {
                strQueryString = @"<Where><Eq><FieldRef Name='ID' /><Value Type='Counter'>" + selectedID + "</Value></Eq></Where>";
                switch (pageType)
                {
                    case MASTERPAGE:
                        {
                            objMasterBLL = new MasterPageBLL();
                            objListEntry = objMasterBLL.SetMasterPageDetail(strParentSiteURL, listName,
                                strQueryString);
                            break;
                        }
                    case TEMPLATE:
                        {
                            objTemplateBLL = new TemplateDetailBLL();
                            objListEntry = objTemplateBLL.GetTemplateDetail(strParentSiteURL, listName,
                                strQueryString);
                            break;
                        }
                    case WELLBOOK:
                        {
                            objWellBookBLL = new WellBookBLL();
                            objListEntry = objWellBookBLL.GetWellBookDetail(strParentSiteURL, listName,
                                strQueryString);
                            break;
                        }
                    case CHAPTER:
                        {
                            objChapterBLL = new ChapterBLL();
                            objListEntry = objChapterBLL.SetChapterDetail(strParentSiteURL, listName, strQueryString);
                            break;
                        }

                    case USERREGISTRATION:
                        {
                            UserRegistrationBLL objUserRegistrationBLL = new UserRegistrationBLL();
                            objListEntry = objUserRegistrationBLL.GetUserDetails(strParentSiteURL, selectedID, listName);
                            break;
                        }

                    case TEAMREGISTRATION:
                    case STAFFREGISTRATION:
                        {
                            TeamStaffRegistrationBLL objTeamStaffRegistrationBLL = new TeamStaffRegistrationBLL();
                            objListEntry = objTeamStaffRegistrationBLL.GetTeamDetails(strParentSiteURL, selectedID, listName);
                            break;
                        }
                }
                return objListEntry;
            }
            catch
            {
                throw;
            }
        }
Пример #3
0
        /// <summary>
        /// Updates the list entry.
        /// </summary>
        /// <param name="listEntry">The list entry.</param>
        /// <param name="listName">Name of the list.</param>
        /// <param name="pageType">Type of the page.</param>
        protected bool UpdateListEntry(DWBDataObjects.ListEntry listEntry, string listName, string auditListName, string pageType, string actionPerformed)
        {
            bool blnUpdateSuccess = false;
            strUserName = GetUserName();
            switch (pageType)
            {
                case MASTERPAGE:
                    {
                        objMasterBLL = new MasterPageBLL();
                        listEntry.MasterPage.PageOwner = strUserName;
                        objMasterBLL.UpdateListEntry(strParentSiteURL, listEntry, auditListName, listName, strUserName, actionPerformed);
                        break;
                    }
                case TEMPLATE:
                    {
                        objTemplateBLL = new TemplateDetailBLL();
                        objTemplateBLL.UpdateListEntry(strParentSiteURL, listEntry, auditListName, listName, strUserName, actionPerformed);
                        break;
                    }
                case TEMPLATEPAGEMAPPING:
                    {
                        objTemplateBLL = new TemplateDetailBLL();
                        objTemplateBLL.UpdateTemplatePageMapping(strParentSiteURL, listEntry, listName, auditListName, strUserName, actionPerformed, listEntry.TemplateDetails.RowId.ToString());
                        break;
                    }
                case MASTERPAGETEMPLATEMAPPING:
                    {
                        objTemplateBLL = new TemplateDetailBLL();
                        objTemplateBLL.UpdateTemplateIDinMasterPageList(strParentSiteURL, listEntry, listName, auditListName, strUserName, actionPerformed);
                        break;
                    }
                case WELLBOOK:
                    {
                        objWellBookBLL = new WellBookBLL();
                        objWellBookBLL.UpdateListEntry(strParentSiteURL, listEntry, auditListName, listName,
                            strUserName, actionPerformed);
                        break;
                    }
                case CHAPTER:
                    {
                        objChapterBLL = new ChapterBLL();
                        objChapterBLL.UpdateListEntry(strParentSiteURL, listEntry, auditListName, listName, strUserName, actionPerformed);
                        break;
                    }
                case CHANGEPAGEOWNER:
                    {
                        objWellBookBLL = new WellBookBLL();
                        objWellBookBLL.UpdatePageOwner(strParentSiteURL, listEntry, auditListName, listName, strUserName, actionPerformed);
                        break;
                    }
                case PAGECOMMENTS:
                    {
                        objWellBookBLL = new WellBookBLL();
                        blnUpdateSuccess = objWellBookBLL.UpdatePageComments(strParentSiteURL, listName, auditListName, listEntry, actionPerformed);
                        break;
                    }
            }

            return blnUpdateSuccess;
        }