コード例 #1
0
ファイル: Item.cs プロジェクト: Xamdes/ToDoList.Solution
        public void Save()
        {
            string        columns    = "description,date,category_id";
            List <string> valueNames = new List <string>()
            {
                "@Description", "@Date", "@Category"
            };
            List <Object> values = new List <Object>()
            {
                _description, _date, _categoryId
            };

            DB.SaveToTable(_tableName, columns, valueNames, values);
            _id = DB.LastInsertId(_tableName);
        }
コード例 #2
0
        public void Save()
        {
            string        columns    = "category";
            List <string> ValueNames = new List <string>()
            {
                "@Name"
            };
            List <Object> values = new List <Object>()
            {
                _name
            };

            DB.SaveToTable(_tableName, columns, ValueNames, values);
            _id = DB.LastInsertId(_tableName);
        }