internal System.Data.DataTable GetNewsFeedList(Lumex.Tech.LumexDBPlayer db) { bool status = true; DataTable dt = new DataTable(); try { dt = db.ExecuteDataTable("SELECT [Serial],[NewsBody],[NewsTitale],[ValidDate],[CreatedBy],[CreatedDate]FROM [dbo].[tblNewsFeed]"); } catch (Exception) { throw; } return dt; }
internal System.Data.DataTable GetNewsFeedDataById(BLL.NewsFeedBLL newsFeedBLL, Lumex.Tech.LumexDBPlayer db) { bool status = true; DataTable dt = new DataTable(); try { db.AddParameters("@Serial", newsFeedBLL.NewsFeedId); dt = db.ExecuteDataTable("SELECT [Serial],[NewsBody],[NewsTitale],[ValidDate],[CreatedBy],[CreatedDate]FROM [dbo].[tblNewsFeed] where Serial=@Serial"); } catch (Exception) { throw; } return dt; }
internal System.Data.DataTable SaveNewsInfo(BLL.NewsFeedBLL newsFeedBLL, Lumex.Tech.LumexDBPlayer db) { DataTable dt = new DataTable(); try { db.AddParameters("@NewsBody", newsFeedBLL.BodyText); db.AddParameters("@NewsTitale", newsFeedBLL.Title); db.AddParameters("@ValidDate", newsFeedBLL.Value); db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId")); db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal()); dt = db.ExecuteDataTable("INSERT INTO [dbo].[tblNewsFeed]([NewsBody],[NewsTitale],[ValidDate],[CreatedBy],[CreatedDate])VALUES(@NewsBody,@NewsTitale,@ValidDate,@CreatedBy,GETDATE())"); } catch (Exception) { //throw; } return dt; }
internal bool checkDuplicateLookupGroup(BLL.initialDataBLL lookUpDataBLL, Lumex.Tech.LumexDBPlayer db) { bool status = true; DataTable dt = new DataTable(); try { db.AddParameters("@ElementName", lookUpDataBLL.ElementGroupName.Trim()); dt = db.ExecuteDataTable("[CHECK_DUPLICATE_ELEMENT_GROUP]", true); if (dt.Rows.Count > 0) { status = false; } } catch (Exception) { throw; } return status; }