Exemple #1
0
        public int Update(Model.ClassType ct)
        {
            string sql = "update [ClassType] set ClassTypeName=@ClassTypeName,IsLiberalArts=@IsLiberalArts";

            int ret = db.Execute(sql, ct);

            return(ret);
        }
Exemple #2
0
        public int Add(Model.ClassType ct)
        {
            string sql = "insert into [ClassType](ClassTypeName,IsLiberalArts)";

            sql += "values (@ClassTypeName,@IsLiberalArts)";

            int ret = db.Execute(sql, ct);

            return(ret);
        }