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

            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.Address = ret[2].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[3]) != 0)
            {
                item.Create_time = new DateTime(long.Parse(ret[3]));
            }
            if (string.Compare("null", ret[4]) != 0)
            {
                item.Is_default = ret[4] == "1";
            }
            if (string.Compare("null", ret[5]) != 0)
            {
                item.Name = ret[5].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[6]) != 0)
            {
                item.Tel = ret[6].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[7]) != 0)
            {
                item.Telphone = ret[7].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[8]) != 0)
            {
                item.Zip = ret[8].Replace(StringifySplit, "|");
            }
            return(item);
        }
Esempio n. 2
0
 public static string ToJson(this Member_addressbookInfo item)
 {
     return(string.Concat(item));
 }
Esempio n. 3
0
 public Member_addressbookInfo AddAddressbook(Member_addressbookInfo item)
 {
     item.Member_id = this.Id;
     return(item.Save());
 }