示例#1
0
        public string GetValues()
        {
            PropertyInfo[] p_list = this.GetType().GetProperties();

            string values = "(";

            foreach (PropertyInfo item in p_list)
            {
                string name = LOSQLiteTools.GetFieldName(item);
                if (name == null || name.Equals("sql_id"))
                {
                    continue;
                }

                values += "'" + item.GetValue(this, null).ToString() + "',";
            }

            values = values.Substring(0, values.Length - 1);

            values += ")";

            return(values);
        }
示例#2
0
        public string GetFields()
        {
            PropertyInfo[] p_list = this.GetType().GetProperties();

            string fields = "(";

            foreach (PropertyInfo item in p_list)
            {
                string name = LOSQLiteTools.GetFieldName(item);
                if (name == null || name.Equals("sql_id"))
                {
                    continue;
                }
                fields += name + ",";
            }


            fields = fields.Substring(0, fields.Length - 1);

            fields += ")";

            return(fields);
        }