Beispiel #1
0
        internal static bool Insert(Entity.Dictionary dict)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic["CATEGORY_ID"]      = dict.CATEGORY_ID;
            dic["KEY"]              = dict.KEY;
            dic["KEY_ALT"]          = dict.KEY_ALT;
            dic["CONTENT"]          = dict.CONTENT;
            dic["CONTENT_ALT"]      = dict.CONTENT_ALT;
            dic["ATTACH_FILE_PATH"] = dict.ATTACH_FILE_PATH;
            return(App.DB.Insert("Dictionary", dic) > 0);
        }
Beispiel #2
0
        internal static bool Update(Entity.Dictionary dict)
        {
            Dictionary <string, object> dic  = new Dictionary <string, object>();
            Dictionary <string, object> cond = new Dictionary <string, object>();

            dic["KEY"]              = dict.KEY;
            dic["KEY_ALT"]          = dict.KEY_ALT;
            dic["CONTENT"]          = dict.CONTENT;
            dic["CONTENT_ALT"]      = dict.CONTENT_ALT;
            dic["ATTACH_FILE_PATH"] = dict.ATTACH_FILE_PATH;

            cond["ID"] = dict.ID;
            return(App.DB.Update("Dictionary", dic, cond) > 0);
        }