Example #1
0
 public Expose178.Com.Model.ArticleAddtional GetArticleAddtional(string strArticleID)
 {
     Expose178.Com.Model.ArticleAddtional addtion = new Model.ArticleAddtional();
     try
     {
         DataSet dsArticleAdd = GetArticleAddtionalByArticleID(strArticleID);
         if (Gadget.DatatSetIsNotNullOrEmpty(dsArticleAdd))
         {
             addtion.AdditionalID    = Gadget.GetDataRowStringValue(dsArticleAdd.Tables[0].Rows[0], "AdditionalID");
             addtion.ArticleID       = strArticleID;
             addtion.LastUpdatedDate = Gadget.GetDataRowDateTimeValue(dsArticleAdd.Tables[0].Rows[0], "LastUpdatedDate");
             addtion.ReadNum         = Gadget.GetDataRowIntValue(dsArticleAdd.Tables[0].Rows[0], "ReadNum");
             addtion.ReplyNum        = Gadget.GetDataRowIntValue(dsArticleAdd.Tables[0].Rows[0], "ReplyNum");
             addtion.UpdatedByUserID = Gadget.GetDataRowStringValue(dsArticleAdd.Tables[0].Rows[0], "UpdatedByUserID");
         }
     }
     catch (Exception ex)
     {
         Hashtable hshParam = new Hashtable();
         hshParam.Add("Error", ex.Message);
         hshParam.Add("UID", Expose178.Com.GadgetScripts.Gadget.GetUserID());
         Expose178.Com.UtilityFactory.Log.WriteLog(hshParam, "ProxyArticle.GetArticleAddtional", UtilityFactory.LogType.LogToDB);
     }
     return(addtion);
 }
Example #2
0
        public IList <Expose178.Com.Model.ArticleTitle> GetArticleTitle()
        {
            IList <Expose178.Com.Model.ArticleTitle> listArticleTile = null;
            DataSet dsArtileTitle = GetDataSetArticleTitle();

            if (Gadget.DatatSetIsNotNullOrEmpty(dsArtileTitle))
            {
                listArticleTile = new List <Expose178.Com.Model.ArticleTitle>();
                foreach (DataRow dr in dsArtileTitle.Tables[0].Rows)
                {
                    Expose178.Com.Model.ArticleTitle art = new Model.ArticleTitle();
                    art.ArticleID      = Gadget.GetDataRowStringValue(dr, "ArticleID");
                    art.ArticleDate    = Gadget.GetDataRowDateTimeValue(dr, "ArticleDate");
                    art.ArticleTile    = Gadget.GetDataRowStringValue(dr, "ArticleTile");
                    art.ArticleSummary = Gadget.GetDataRowStringValue(dr, "ArticleSummary");
                    art.ReadNum        = Gadget.GetDataRowIntValue(dr, "ReadNum");
                    art.ReplyNum       = Gadget.GetDataRowIntValue(dr, "ReplyNum");
                    listArticleTile.Add(art);
                }
            }
            return(listArticleTile);
        }