예제 #1
0
        public static string GetMetaString(string table, string table_column_key, object column_key_value, string meta_key)
        {
            object res = SBMeta.GetMeta(table, table_column_key, column_key_value, meta_key);

            if (res == null)
            {
                return("");
            }
            return(res.ToString());
        }
예제 #2
0
        public static DateTime GetMetaDate(string table, string table_column_key, object column_key_value, string meta_key)
        {
            object meta_value = SBMeta.GetMeta(table, table_column_key, column_key_value, meta_key);

            if (meta_value == null)
            {
                return(DateTime.MinValue);
            }
            DateTime date;

            if (!DateTime.TryParse(meta_value.ToString(), out date))
            {
                return(DateTime.MinValue);
            }
            return(date);
        }
예제 #3
0
        public static bool UpdateMeta(string table, string table_column_key, object column_key_value, string meta_key, object meta_value)
        {
            if (SBMeta.GetMeta(table, table_column_key, column_key_value, meta_key) == null)
            {
                SBMeta.AddMeta(table, table_column_key, column_key_value, meta_key, meta_value);
            }
            else
            {
                Hashtable data = new Hashtable();
                data.Add("meta_value", meta_value);
                Hashtable w = new Hashtable();
                w.Add(table_column_key, column_key_value);
                w.Add("meta_key", meta_key);
                SBFactory.getDbh().update(table, data, w);
            }

            return(true);
        }
예제 #4
0
 public DateTime GetMetaDate(string meta_key)
 {
     return(SBMeta.GetMetaDate("person_meta", "person_code_id", this.PersonCode, meta_key));
 }
예제 #5
0
 public string GetMetaString(string meta_key)
 {
     return(SBMeta.GetMetaString("person_meta", "person_code_id", this.PersonCode, meta_key));
 }
예제 #6
0
 public object GetMeta(string meta_key)
 {
     return(SBMeta.GetMeta("person_meta", "person_code_id", this.PersonCode, meta_key));
 }