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

            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.Parent_id = uint.Parse(ret[2]);
            }
            if (string.Compare("null", ret[3]) != 0)
            {
                item.Product_id = uint.Parse(ret[3]);
            }
            if (string.Compare("null", ret[4]) != 0)
            {
                item.Content = ret[4].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[5]) != 0)
            {
                item.Create_time = new DateTime(long.Parse(ret[5]));
            }
            if (string.Compare("null", ret[6]) != 0)
            {
                item.Email = ret[6].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[7]) != 0)
            {
                item.Name = ret[7].Replace(StringifySplit, "|");
            }
            if (string.Compare("null", ret[8]) != 0)
            {
                item.State = (Product_questionSTATE)long.Parse(ret[8]);
            }
            return(item);
        }
Esempio n. 2
0
 public Product_questionInfo AddQuestion(Product_questionInfo item)
 {
     item.Product_id = this.Id;
     return(item.Save());
 }
Esempio n. 3
0
 public Product_questionInfo AddQuestion(MemberInfo Member, Product_questionInfo Product_question, string Content, DateTime?Create_time, string Email, string Name, Product_questionSTATE?State) => AddQuestion(Member.Id, Product_question.Id, Content, Create_time, Email, Name, State);
Esempio n. 4
0
 public static string ToJson(this Product_questionInfo item)
 {
     return(string.Concat(item));
 }
Esempio n. 5
0
 public Product_questionInfo AddProduct_question(Product_questionInfo Product_question, ProductInfo Product, string Content, DateTime?Create_time, string Email, string Name, Product_questionSTATE?State) => AddProduct_question(Product_question.Id, Product.Id, Content, Create_time, Email, Name, State);