Exemplo n.º 1
0
        public static ProductitemInfo Parse(string stringify)
        {
            string[] ret = stringify.Split(new char[] { '|' }, 7, StringSplitOptions.None);
            if (ret.Length != 7)
            {
                throw new Exception("格式不正确,ProductitemInfo:" + stringify);
            }
            ProductitemInfo item = new ProductitemInfo();

            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.Img_url = ret[2].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[3]) != 0)
            {
                item.Name = ret[3].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[4]) != 0)
            {
                item.Original_price = decimal.Parse(ret[4]);
            }
            if (string.Compare("null", ret[5]) != 0)
            {
                item.Price = decimal.Parse(ret[5]);
            }
            if (string.Compare("null", ret[6]) != 0)
            {
                item.Stock = uint.Parse(ret[6]);
            }
            return(item);
        }
Exemplo n.º 2
0
 public ProductitemInfo AddProductitem(ProductitemInfo item)
 {
     item.Product_id = this.Id;
     return(item.Save());
 }
Exemplo n.º 3
0
 public Product_commentInfo AddComment(MemberInfo Member, OrderInfo Order, ProductitemInfo Productitem, string Content, DateTime?Create_time, string Nickname, byte?Star_price, byte?Star_quality, byte?Star_value, Product_commentSTATE?State, string Title, string Upload_image_url) => AddComment(Member.Id, Order.Id, Productitem.Id, Content, Create_time, Nickname, Star_price, Star_quality, Star_value, State, Title, Upload_image_url);
Exemplo n.º 4
0
 public Order_refundInfo AddRefund(ProductitemInfo Productitem, DateTime?Create_time, string Descript, string Email, string Img_url, Order_refundSTATE?State, string Tel, string Telphone, decimal?Wealth) => AddRefund(Productitem.Id, Create_time, Descript, Email, Img_url, State, Tel, Telphone, Wealth);
Exemplo n.º 5
0
 public int UnflagProductitem(ProductitemInfo Productitem) => UnflagProductitem(Productitem.Id);
Exemplo n.º 6
0
 public Order_productitemInfo FlagProductitem(ProductitemInfo Productitem, uint?Number, decimal?Price, Order_productitemSTATE?State, string Title) => FlagProductitem(Productitem.Id, Number, Price, State, Title);
Exemplo n.º 7
0
 public static string ToJson(this ProductitemInfo item)
 {
     return(string.Concat(item));
 }