Beispiel #1
0
 public static string ToJson(this Product_commentInfo item)
 {
     return(string.Concat(item));
 }
Beispiel #2
0
 public Product_commentInfo AddProduct_comment(Product_commentInfo item)
 {
     item.Productitem_id = this.Id;
     return(item.Save());
 }
Beispiel #3
0
        public static Product_commentInfo Parse(string stringify)
        {
            string[] ret = stringify.Split(new char[] { '|' }, 14, StringSplitOptions.None);
            if (ret.Length != 14)
            {
                throw new Exception("格式不正确,Product_commentInfo:" + stringify);
            }
            Product_commentInfo item = new Product_commentInfo();

            if (string.Compare("null", ret[0]) != 0)
            {
                item.Id = uint.Parse(ret[0]);
            }
            if (string.Compare("null", ret[1]) != 0)
            {
                item.Member_id = uint.Parse(ret[1]);
            }
            if (string.Compare("null", ret[2]) != 0)
            {
                item.Order_id = uint.Parse(ret[2]);
            }
            if (string.Compare("null", ret[3]) != 0)
            {
                item.Product_id = uint.Parse(ret[3]);
            }
            if (string.Compare("null", ret[4]) != 0)
            {
                item.Productitem_id = uint.Parse(ret[4]);
            }
            if (string.Compare("null", ret[5]) != 0)
            {
                item.Content = ret[5].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[6]) != 0)
            {
                item.Create_time = new DateTime(long.Parse(ret[6]));
            }
            if (string.Compare("null", ret[7]) != 0)
            {
                item.Nickname = ret[7].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[8]) != 0)
            {
                item.Star_price = byte.Parse(ret[8]);
            }
            if (string.Compare("null", ret[9]) != 0)
            {
                item.Star_quality = byte.Parse(ret[9]);
            }
            if (string.Compare("null", ret[10]) != 0)
            {
                item.Star_value = byte.Parse(ret[10]);
            }
            if (string.Compare("null", ret[11]) != 0)
            {
                item.State = (Product_commentSTATE)long.Parse(ret[11]);
            }
            if (string.Compare("null", ret[12]) != 0)
            {
                item.Title = ret[12].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[13]) != 0)
            {
                item.Upload_image_url = ret[13].Replace(StringifySplit, "|");
            }
            return(item);
        }