public static Order_addressInfo Parse(string stringify) { string[] ret = stringify.Split(new char[] { '|' }, 6, StringSplitOptions.None); if (ret.Length != 6) { throw new Exception("格式不正确,Order_addressInfo:" + stringify); } Order_addressInfo item = new Order_addressInfo(); if (string.Compare("null", ret[0]) != 0) { item.Order_id = uint.Parse(ret[0]); } if (string.Compare("null", ret[1]) != 0) { item.Address = ret[1].Replace(StringifySplit, "|"); } if (string.Compare("null", ret[2]) != 0) { item.Name = ret[2].Replace(StringifySplit, "|"); } if (string.Compare("null", ret[3]) != 0) { item.Tel = ret[3].Replace(StringifySplit, "|"); } if (string.Compare("null", ret[4]) != 0) { item.Telphone = ret[4].Replace(StringifySplit, "|"); } if (string.Compare("null", ret[5]) != 0) { item.Zip = ret[5].Replace(StringifySplit, "|"); } return(item); }
public Order_addressInfo AddAddress(Order_addressInfo item) { item.Order_id = this.Id; return(item.Save()); }
public static string ToJson(this Order_addressInfo item) { return(string.Concat(item)); }