public int RemoveStudentFromClass(Entity.Student s, Entity.Class c)
        {
            string sql = "delete from [classassignment] where xsbh=" + s.ID + " and bjbh=" + c.ID;

            int ret = db.Execute(sql);

            return(ret);
        }
Exemple #2
0
        public int Update(Entity.Class c)
        {
            string sql = "update [class] set bjmc='" + c.bjmc + "', bzrxm='" + c.bzrxm + "', bjlb='" + c.bjlb + "' where ID=" + c.ID;

            int ret = db.Execute(sql);

            return(ret);
        }
        public int AddStudentToClass(Entity.Student s, Entity.Class c)
        {
            string sql = "insert into [classassignment](xsbh, bjbh) values(" + s.ID + ", " + c.ID + ")";

            int ret = db.Execute(sql);

            return(ret);
        }
Exemple #4
0
        public int Add(Entity.Class c)
        {
            string sql = "insert into [class](bjmc, bzrxm, bjlb) values('" + c.bjmc + "','" + c.bzrxm + "','" + c.bjlb + "')";

            int ret = db.Execute(sql);

            return(ret);
        }