public static MarkettypeInfo Parse(string stringify) { string[] ret = stringify.Split(new char[] { '|' }, 5, StringSplitOptions.None); if (ret.Length != 5) { throw new Exception("格式不正确,MarkettypeInfo:" + stringify); } MarkettypeInfo item = new MarkettypeInfo(); if (string.Compare("null", ret[0]) != 0) { item.Id = uint.Parse(ret[0]); } if (string.Compare("null", ret[1]) != 0) { item.Market_id = uint.Parse(ret[1]); } if (string.Compare("null", ret[2]) != 0) { item.Parent_id = uint.Parse(ret[2]); } if (string.Compare("null", ret[3]) != 0) { item.Sort = byte.Parse(ret[3]); } if (string.Compare("null", ret[4]) != 0) { item.Title = ret[4].Replace(StringifySplit, "|"); } return(item); }
public static string ToJson(this MarkettypeInfo item) { return(string.Concat(item)); }
public ShopInfo AddShop(MarkettypeInfo Markettype, string Address, decimal?Area, string Code, DateTime?Create_time, string Fax, ShopFUNC_SWITCH?Func_switch, ShopICON?Icon, string Kefu, string Main_business, string Nickname, ShopSTATE?State, string Title) => AddShop(Markettype.Id, Address, Area, Code, Create_time, Fax, Func_switch, Icon, Kefu, Main_business, Nickname, State, Title);
public MarkettypeInfo AddMarkettype(MarkettypeInfo item) { item.Parent_id = this.Id; return(item.Save()); }
public int UnflagMarkettype(MarkettypeInfo Markettype) => UnflagMarkettype(Markettype.Id);
public Markettype_categoryInfo FlagMarkettype(MarkettypeInfo Markettype) => FlagMarkettype(Markettype.Id);
public MarkettypeInfo AddMarkettype(MarkettypeInfo Markettype, byte?Sort, string Title) => AddMarkettype(Markettype.Id, Sort, Title);