コード例 #1
0
        public static Product_buyruleInfo Parse(string stringify)
        {
            string[] ret = stringify.Split(new char[] { '|' }, 5, StringSplitOptions.None);
            if (ret.Length != 5)
            {
                throw new Exception("格式不正确,Product_buyruleInfo:" + stringify);
            }
            Product_buyruleInfo item = new Product_buyruleInfo();

            if (string.Compare("null", ret[0]) != 0)
            {
                item.Id = uint.Parse(ret[0]);
            }
            if (string.Compare("null", ret[1]) != 0)
            {
                item.Product_id = uint.Parse(ret[1]);
            }
            if (string.Compare("null", ret[2]) != 0)
            {
                item.Discount = uint.Parse(ret[2]);
            }
            if (string.Compare("null", ret[3]) != 0)
            {
                item.Ordering_end = uint.Parse(ret[3]);
            }
            if (string.Compare("null", ret[4]) != 0)
            {
                item.Ordering_start = uint.Parse(ret[4]);
            }
            return(item);
        }
コード例 #2
0
 public Product_buyruleInfo AddBuyrule(Product_buyruleInfo item)
 {
     item.Product_id = this.Id;
     return(item.Save());
 }
コード例 #3
0
 public static string ToJson(this Product_buyruleInfo item)
 {
     return(string.Concat(item));
 }