public bool Insert(int ArticleId, int LanguageId, string ArticleName, string ArticleContent, string ArticleAttachment, string AuthorAlias, string ArticleAlias, DateTime PostDate, DateTime PublishStartDate, DateTime PublishEndDate, DateTime RevisionDate, DateTime ModifiedDate, string ArticleSummary) { ArticleLanguageDAC articlelanguageComponent = new ArticleLanguageDAC(); int ArticleLanguageId = 0; return(articlelanguageComponent.InsertNewArticleLanguage(ref ArticleLanguageId, ArticleId, LanguageId, ArticleName, ArticleContent, ArticleAttachment, AuthorAlias, ArticleAlias, PostDate, PublishStartDate, PublishEndDate, RevisionDate, ModifiedDate, ArticleSummary)); }
public bool Insert(ArticleLanguage articlelanguage) { int autonumber = 0; ArticleLanguageDAC articlelanguageComponent = new ArticleLanguageDAC(); bool endedSuccessfuly = articlelanguageComponent.InsertNewArticleLanguage(ref autonumber, articlelanguage.ArticleId, articlelanguage.LanguageId, articlelanguage.ArticleName, articlelanguage.ArticleContent, articlelanguage.ArticleAttachment, articlelanguage.AuthorAlias, articlelanguage.ArticleAlias, articlelanguage.PostDate, articlelanguage.PublishStartDate, articlelanguage.PublishEndDate, articlelanguage.RevisionDate, articlelanguage.ModifiedDate, articlelanguage.ArticleSummary); if (endedSuccessfuly) { articlelanguage.ArticleLanguageId = autonumber; } return(endedSuccessfuly); }
public List <ArticleLanguage> GetAllByArticleId(int ArticleId) { ArticleLanguageDAC _articleLanguageComponent = new ArticleLanguageDAC(); IDataReader reader = _articleLanguageComponent.GetAllArticleLanguage("ArticleId = " + ArticleId).CreateDataReader(); List <ArticleLanguage> _articleLanguageList = new List <ArticleLanguage>(); while (reader.Read()) { if (_articleLanguageList == null) { _articleLanguageList = new List <ArticleLanguage>(); } ArticleLanguage _articleLanguage = new ArticleLanguage(); if (reader["ArticleLanguageId"] != DBNull.Value) { _articleLanguage.ArticleLanguageId = Convert.ToInt32(reader["ArticleLanguageId"]); } if (reader["ArticleId"] != DBNull.Value) { _articleLanguage.ArticleId = Convert.ToInt32(reader["ArticleId"]); } if (reader["LanguageId"] != DBNull.Value) { _articleLanguage.LanguageId = Convert.ToInt32(reader["LanguageId"]); } if (reader["ArticleName"] != DBNull.Value) { _articleLanguage.ArticleName = Convert.ToString(reader["ArticleName"]); } if (reader["ArticleContent"] != DBNull.Value) { _articleLanguage.ArticleContent = Convert.ToString(reader["ArticleContent"]); } if (reader["ArticleAttachment"] != DBNull.Value) { _articleLanguage.ArticleAttachment = Convert.ToString(reader["ArticleAttachment"]); } if (reader["AuthorAlias"] != DBNull.Value) { _articleLanguage.AuthorAlias = Convert.ToString(reader["AuthorAlias"]); } if (reader["ArticleAlias"] != DBNull.Value) { _articleLanguage.ArticleAlias = Convert.ToString(reader["ArticleAlias"]); } if (reader["PostDate"] != DBNull.Value) { _articleLanguage.PostDate = Convert.ToDateTime(reader["PostDate"]); } if (reader["PublishStartDate"] != DBNull.Value) { _articleLanguage.PublishStartDate = Convert.ToDateTime(reader["PublishStartDate"]); } if (reader["PublishEndDate"] != DBNull.Value) { _articleLanguage.PublishEndDate = Convert.ToDateTime(reader["PublishEndDate"]); } if (reader["RevisionDate"] != DBNull.Value) { _articleLanguage.RevisionDate = Convert.ToDateTime(reader["RevisionDate"]); } if (reader["ModifiedDate"] != DBNull.Value) { _articleLanguage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]); } if (reader["ArticleSummary"] != DBNull.Value) { _articleLanguage.ArticleSummary = Convert.ToString(reader["ArticleSummary"]); } _articleLanguage.NewRecord = false; _articleLanguageList.Add(_articleLanguage); } reader.Close(); return(_articleLanguageList); }
public int UpdateDataset(System.Data.DataSet dataset) { ArticleLanguageDAC articlelanguagecomponent = new ArticleLanguageDAC(); return(articlelanguagecomponent.UpdateDataset(dataset)); }
public ArticleLanguage GetByArticleIDlanguageId(int ArticleId, int LanguageId) { ArticleLanguageDAC _articleLanguageComponent = new ArticleLanguageDAC(); IDataReader reader = _articleLanguageComponent.GetByIDArticleIdLanguageIdArticlelanguage(ArticleId, LanguageId); ArticleLanguage _articleLanguage = null; while (reader.Read()) { _articleLanguage = new ArticleLanguage(); if (reader["ArticleLanguageId"] != DBNull.Value) { _articleLanguage.ArticleLanguageId = Convert.ToInt32(reader["ArticleLanguageId"]); } if (reader["ArticleId"] != DBNull.Value) { _articleLanguage.ArticleId = Convert.ToInt32(reader["ArticleId"]); } if (reader["LanguageId"] != DBNull.Value) { _articleLanguage.LanguageId = Convert.ToInt32(reader["LanguageId"]); } if (reader["ArticleName"] != DBNull.Value) { _articleLanguage.ArticleName = Convert.ToString(reader["ArticleName"]); } if (reader["ArticleContent"] != DBNull.Value) { _articleLanguage.ArticleContent = Convert.ToString(reader["ArticleContent"]); } if (reader["ArticleAttachment"] != DBNull.Value) { _articleLanguage.ArticleAttachment = Convert.ToString(reader["ArticleAttachment"]); } if (reader["AuthorAlias"] != DBNull.Value) { _articleLanguage.AuthorAlias = Convert.ToString(reader["AuthorAlias"]); } if (reader["ArticleAlias"] != DBNull.Value) { _articleLanguage.ArticleAlias = Convert.ToString(reader["ArticleAlias"]); } if (reader["PostDate"] != DBNull.Value) { _articleLanguage.PostDate = Convert.ToDateTime(reader["PostDate"]); } if (reader["PublishStartDate"] != DBNull.Value) { _articleLanguage.PublishStartDate = Convert.ToDateTime(reader["PublishStartDate"]); } if (reader["PublishEndDate"] != DBNull.Value) { _articleLanguage.PublishEndDate = Convert.ToDateTime(reader["PublishEndDate"]); } if (reader["RevisionDate"] != DBNull.Value) { _articleLanguage.RevisionDate = Convert.ToDateTime(reader["RevisionDate"]); } if (reader["ModifiedDate"] != DBNull.Value) { _articleLanguage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]); } if (reader["ArticleSummary"] != DBNull.Value) { _articleLanguage.ArticleSummary = Convert.ToString(reader["ArticleSummary"]); } _articleLanguage.NewRecord = false; } reader.Close(); return(_articleLanguage); }
public void DeleteByArticleId(int Original_ArticleId) { ArticleLanguageDAC articlelanguageComponent = new ArticleLanguageDAC(); articlelanguageComponent.EXQuery("Delete From ContentManagement.ArticleLanguage Where ArticleId = " + Original_ArticleId); }
public void Delete(int Original_ArticleLanguageId) { ArticleLanguageDAC articlelanguageComponent = new ArticleLanguageDAC(); articlelanguageComponent.DeleteArticleLanguage(Original_ArticleLanguageId); }
public bool Update(int ArticleId, int LanguageId, string ArticleName, string ArticleContent, string ArticleAttachment, string AuthorAlias, string ArticleAlias, DateTime PostDate, DateTime PublishStartDate, DateTime PublishEndDate, DateTime RevisionDate, DateTime ModifiedDate, string ArticleSummary, int Original_ArticleLanguageId) { ArticleLanguageDAC articlelanguageComponent = new ArticleLanguageDAC(); return(articlelanguageComponent.UpdateArticleLanguage(ArticleId, LanguageId, ArticleName, ArticleContent, ArticleAttachment, AuthorAlias, ArticleAlias, PostDate, PublishStartDate, PublishEndDate, RevisionDate, ModifiedDate, ArticleSummary, Original_ArticleLanguageId)); }
public bool Update(ArticleLanguage articlelanguage, int old_articleLanguageId) { ArticleLanguageDAC articlelanguageComponent = new ArticleLanguageDAC(); return(articlelanguageComponent.UpdateArticleLanguage(articlelanguage.ArticleId, articlelanguage.LanguageId, articlelanguage.ArticleName, articlelanguage.ArticleContent, articlelanguage.ArticleAttachment, articlelanguage.AuthorAlias, articlelanguage.ArticleAlias, articlelanguage.PostDate, articlelanguage.PublishStartDate, articlelanguage.PublishEndDate, articlelanguage.RevisionDate, articlelanguage.ModifiedDate, articlelanguage.ArticleSummary, old_articleLanguageId)); }