public int Update(Model.ClassType ct) { string sql = "update [ClassType] set ClassTypeName=@ClassTypeName,IsLiberalArts=@IsLiberalArts"; int ret = db.Execute(sql, ct); return(ret); }
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); }