Esempio n. 1
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;
            }
        }