//删除学生信息
        public List <object> DeletXuesheng(string XueshengId)
        {
            Maticsoft.BLL.学生表 Op = new Maticsoft.BLL.学生表();



            var data = new List <object>();

            if (Op.Delete(XueshengId, ""))
            {
                data.Add(

                    new { success = "true", message = "学生删除成功", }


                    );
            }
            else
            {
                data.Add(

                    new { success = "false", message = "学生删除失败", }

                    );
            }



            return(data);
        }
        //得到学生详细信息
        public List <object> getUserCardInfoDetails(string userid)
        {
            Maticsoft.Model.学生证表 newinfo   = new Maticsoft.Model.学生证表();
            Maticsoft.BLL.学生证表   SQLOption = new Maticsoft.BLL.学生证表();

            Maticsoft.Model.学生表 XueshengInfo    = new Maticsoft.Model.学生表();
            Maticsoft.BLL.学生表   SQLXueshengInfo = new Maticsoft.BLL.学生表();


            if (SQLOption.Exists(userid))
            {
                newinfo = SQLOption.GetModel(userid);                //得到学生证实体类

                XueshengInfo = SQLXueshengInfo.GetModel(userid, ""); //得到学生信息
            }

            var data = new List <object>()
            {
                new { StuName        = newinfo.姓名, StuSex = XueshengInfo.性别, StuBirth = XueshengInfo.生日,
                      StuInstitution = XueshengInfo.学院,
                      StuPro         = XueshengInfo.专业,
                      StuClass       = XueshengInfo.班级,
                      StuId          = newinfo.学号,
                      StuFazhengTime = newinfo.发证日期,
                      StuYouxiaoTime = newinfo.效期,

                      Option = "测试", },
            };


            return(data);
        }
        //得到学生信息
        public List <object> GetStuInfo(string banji)
        {
            System.Data.DataSet newinfo = new System.Data.DataSet();
            Maticsoft.BLL.学生表   StuOp   = new Maticsoft.BLL.学生表();

            newinfo = StuOp.GetList("班级='" + banji + "'");

            var data   = new List <object>();
            int length = newinfo.Tables["ds"].Rows.Count;

            for (int i = 0; i < length; i++)
            {
                data.Add(
                    new { StuId = newinfo.Tables["ds"].Rows[i]["学号"], StuName = newinfo.Tables["ds"].Rows[i]["姓名"], }
                    );
            }

            return(data);
        }
        //学生注册信息

        public JObject SingupInfo(JObject info)
        {
            JObject reV        = new JObject();
            bool    StuAdd     = false;
            bool    SignUpExit = true;

            Maticsoft.BLL.学生表   StuSQL = new Maticsoft.BLL.学生表();
            Maticsoft.Model.学生表 newStu = new Maticsoft.Model.学生表();

            Maticsoft.BLL.登录表   SignupSQL = new Maticsoft.BLL.登录表();
            Maticsoft.Model.登录表 newSign   = new Maticsoft.Model.登录表();
            newStu.班级 = info["banji"].ToString();
            newStu.生日 = DateTime.ParseExact(info["stuBirth"].ToString(), "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture);
            newStu.性别 = info["stuGender"].ToString();
            newStu.姓名 = info["stuName"].ToString();
            newStu.学号 = info["stuId"].ToString();
            newStu.学院 = info["xueyuan"].ToString();
            newStu.专业 = info["zhuanye"].ToString();
            newStu.邮箱 = info["stuEmail"].ToString();


            newSign.账号 = info["stuId"].ToString();
            newSign.密码 = info["stuPs"].ToString();
            newSign.职务 = "学生";

            SignupSQL.Add(newSign);
            if (SignupSQL.Exists(newSign.账号))
            {
                if (!StuSQL.Exists(newStu.学号, newStu.邮箱))
                {
                    StuAdd = StuSQL.Add(newStu); //添加学生信息状态
                }
                else
                {
                    reV.Add("success", "false");
                    reV.Add("message", "学号已经注册");
                    return(reV);
                }
            }
            else
            {
                SignUpExit = false; //登录表不存在信息

                reV.Add("success", "false");
                reV.Add("message", "学号尚未录入无法注册");

                return(reV);
            }

            if (StuAdd)
            {
                reV.Add("success", "true");
                reV.Add("message", "注册成功");
            }
            else
            {
                reV.Add("success", "false");
                reV.Add("message", "注册失败");
            }

            return(reV);
        }