public static void SetInstance(ProductFieldTypes anInstance)
 {
     if (anInstance != null)
     {
         instance = anInstance;
     }
 }
 public static ProductFieldTypes GetProductFieldType()
 {
     if (instance == null)
     {
         lock (lockHelper)
         {
             if (instance == null)
             {
                 instance = new ProductFieldTypes();
             }
         }
     }
     return(instance);
 }
        /// <summary>
        /// 商品自定义字段类型为DataTable
        /// </summary>
        public static DataTable GetProductFieldTypes()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("Name", typeof(string));
            dt.Columns.Add("ID", typeof(string));
            dt.Columns.Add("Format", typeof(string));
            dt.Columns.Add("Other", typeof(string));

            foreach (ProductFieldTypes.Rewrite FieldTypes in ProductFieldTypes.GetProductFieldType().FieldTypes)
            {
                DataRow dr = dt.NewRow();
                dr["Name"]   = FieldTypes.Name;
                dr["ID"]     = FieldTypes.ID;
                dr["Format"] = FieldTypes.Format;
                dr["Other"]  = FieldTypes.Other;

                dt.Rows.Add(dr);
            }
            dt.AcceptChanges();
            return(dt);
        }