Example #1
0
        public News_newstagInfo FlagNews(uint?News_id)
        {
            News_newstagInfo item = News_newstag.GetItem(News_id.Value, this.Id.Value);

            if (item == null)
            {
                item = News_newstag.Insert(new News_newstagInfo {
                    News_id    = News_id,
                    Newstag_id = this.Id
                });
            }
            return(item);
        }
Example #2
0
        public static News_newstagInfo Parse(string stringify)
        {
            string[] ret = stringify.Split(new char[] { '|' }, 2, StringSplitOptions.None);
            if (ret.Length != 2)
            {
                throw new Exception("格式不正确,News_newstagInfo:" + stringify);
            }
            News_newstagInfo item = new News_newstagInfo();

            if (string.Compare("null", ret[0]) != 0)
            {
                item.News_id = uint.Parse(ret[0]);
            }
            if (string.Compare("null", ret[1]) != 0)
            {
                item.Newstag_id = uint.Parse(ret[1]);
            }
            return(item);
        }
Example #3
0
 public static string ToJson(this News_newstagInfo item)
 {
     return(string.Concat(item));
 }