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);
        }
        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 #3
0
        public int Add(Entity.Student s)
        {
            string sql = "insert into [student](zkksh,xm,kslb,xb,mz,csrq,zzmm,kstz,czbyxx,txdz,lxdh,yzbm,sfzh,hkxz,jtcs,dq,xq,ksyz,ksztdm,gzlqxxdm,gzlqxx,gzlqsj,zz,yw,sx,wl,hx,wy,tzf,zf,fqxm,mqxm,xjh,bdrq,bddd) ";

            sql += "values (@zkksh,@xm,@kslb,@xb,@mz,@csrq,@zzmm,@kstz,@czbyxx,@txdz,@lxdh,@yzbm,@sfzh,@hkxz,@jtcs,@dq,@xq,@ksyz,@ksztdm,@gzlqxxdm,@gzlqxx,@gzlqsj,@zz,@yw,@sx,@wl,@hx,@wy,@tzf,@zf,@fqxm,@mqxm,@xjh,@bdrq,@bddd)";

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

            return(ret);
        }