Пример #1
0
        public static MarketdescInfo Parse(string stringify)
        {
            string[] ret = stringify.Split(new char[] { '|' }, 3, StringSplitOptions.None);
            if (ret.Length != 3)
            {
                throw new Exception("格式不正确,MarketdescInfo:" + stringify);
            }
            MarketdescInfo item = new MarketdescInfo();

            if (string.Compare("null", ret[0]) != 0)
            {
                item.Market_id = uint.Parse(ret[0]);
            }
            if (string.Compare("null", ret[1]) != 0)
            {
                item.Content = ret[1].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[2]) != 0)
            {
                item.Url = ret[2].Replace(StringifySplit, "|");
            }
            return(item);
        }
Пример #2
0
 public static string ToJson(this MarketdescInfo item)
 {
     return(string.Concat(item));
 }
Пример #3
0
 public MarketdescInfo AddMarketdesc(MarketdescInfo item)
 {
     item.Market_id = this.Id;
     return(item.Save());
 }