/// <summary> /// This Method will populate the StoryMoreAbout object from the Data row /// </summary> /// /// <param name="drStory">A DataRow which contain the story detail</param> /// /// <returns>This method will return the StoryMoreAbout object</returns> private StoryMoreAbout GetMoreAboutSection(DataRow drStory) { try { StoryMoreAbout objMoreAbout = new StoryMoreAbout(); objMoreAbout.PrimaryTitle = drStory["PrimaryTitle"].ToString(); objMoreAbout.SecondaryTitle = drStory["SecondaryTitle"].ToString(); objMoreAbout.SectionAnswer = drStory["SectionAnswer"].ToString().Replace("\n", "<br />"); objMoreAbout.UserId = int.Parse(drStory["UserId"].ToString()); objMoreAbout.SectionId = int.Parse(drStory["SectionId"].ToString()); objMoreAbout.UserBiographyId = int.Parse(drStory["UserBiographyId"].ToString()); return objMoreAbout; } catch (Exception ex) { throw ex; } }
/// <summary> /// this Method will get the Topic list /// </summary> /// /// <param name="objStoryParam">An object which contain the Tribute type for which wants to /// get the Topic list /// </param> /// /// <returns>This method will return the StoryMoreAbout object which contain the list of topic /// </returns> public IList<StoryMoreAbout> GetTopic(object[] objStory) { List<StoryMoreAbout> lstTopic = new List<StoryMoreAbout>(); try { if (objStory != null) { DataSet dsTopic = new DataSet(); dsTopic = GetDataSet("usp_GetTopicList", objStory); if (dsTopic.Tables.Count > 0) { if (dsTopic.Tables[0].Rows.Count > 0) { foreach (DataRow drTopic in dsTopic.Tables[0].Rows) { if (drTopic["Topic"].ToString() != "") { StoryMoreAbout objTopic = new StoryMoreAbout(); objTopic.SecondaryTitle = drTopic["Topic"].ToString(); lstTopic.Add(objTopic); objTopic = null; } } } } } } catch (System.Data.SqlClient.SqlException sqlEx) { if (sqlEx.Number >= 50000) { Errors objError = new Errors(); objError.ErrorMessage = sqlEx.Message; StoryMoreAbout objTopic = new StoryMoreAbout(); objTopic.CustomError = objError; lstTopic.Add(objTopic); objTopic = null; } } catch (Exception ex) { throw ex; } return lstTopic; }