public static int ClassDelete(string schid, string schclassid)
        {
            int ret = 0;

            SchSystem.BLL.SchClassInfo classbll = new SchSystem.BLL.SchClassInfo();
            bool resultBool = classbll.ExistsClassStuData(int.Parse(schclassid));

            SchSystem.BLL.SchClassUser classuserbll = new SchSystem.BLL.SchClassUser();
            bool resultBoolUser = classuserbll.ExistsClassUser(schid, schclassid);

            if (resultBool || resultBoolUser)//如果为true说明是班级内有数据
            {
                ret = 0;
            }
            else//否则即可删除班级记录
            {
                SchSystem.Model.SchClassInfo classmodel = new SchSystem.Model.SchClassInfo();
                classmodel.ClassId     = int.Parse(schclassid);
                classmodel.IsFinish    = 2;
                classmodel.LastRecTime = DateTime.Now;
                classmodel.LastRecUser = Com.Session.userid;
                if (classbll.UpdateStat(classmodel))
                {
                    //SchSystem.BLL.SchClassUser scuBll = new SchSystem.BLL.SchClassUser();
                    // bool ecu = scuBll.ExistsClassUser(int.Parse(schid), int.Parse(classid));
                    //bool scubool = scuBll.Delete(classid, schid);
                    //if (scubool)
                    // {
                    ret = 1;
                    //}
                }
                else
                {
                    ret = 0;
                }
            }
            return(ret);
        }
        public static string udel(string type, string schid, string gradeid, string classid)
        {
            schid   = Com.Public.SqlEncStr(schid);
            gradeid = Com.Public.SqlEncStr(gradeid);
            classid = Com.Public.SqlEncStr(classid);
            string ret = "";

            Com.DataPack.DataRsp <Com.DataPack.UserInfo> rsp = Com.Public.UserFuncSoure(Com.SoureSession.jsid, Com.SoureSession.jstoken);
            if (rsp.code == "ERROR_TOKEN")
            {
                ret = "expire";
            }
            else
            {
                try
                {
                    if (!Com.Public.isVa(schid, ""))
                    {
                        return(ret = "无跨界权限");
                    }
                    if (schid == Com.Public.getKey("adminschid"))
                    {
                        ret = "此为系统学校,不允许操作";
                    }
                    else
                    {
                        if (type == "1")//删除年级
                        {
                            SchSystem.BLL.SchGradeInfo   bll   = new SchSystem.BLL.SchGradeInfo();
                            SchSystem.Model.SchGradeInfo model = new SchSystem.Model.SchGradeInfo();
                            model.GradeId     = int.Parse(gradeid);
                            model.IsFinish    = 2;
                            model.LastRecTime = DateTime.Now;
                            model.LastRecUser = Com.SoureSession.Soureuserid;
                            if (bll.UpdateStat(model))
                            {
                                ret = "success";
                            }
                            else
                            {
                                ret = "操作失败";
                            }
                        }
                        else if (type == "0")//删除班级
                        {
                            SchSystem.BLL.SchClassInfo classbll = new SchSystem.BLL.SchClassInfo();
                            bool resultBool = classbll.ExistsClassStuData(int.Parse(classid));
                            SchSystem.BLL.SchClassUser classuserbll = new SchSystem.BLL.SchClassUser();
                            bool resultBoolUser = classuserbll.ExistsClassUser(schid, classid);
                            if (resultBool || resultBoolUser)//如果为true说明是班级内有属性数据
                            {
                                ret = "success01";
                            }
                            else//否则即可删除班级记录
                            {
                                SchSystem.Model.SchClassInfo classmodel = new SchSystem.Model.SchClassInfo();
                                classmodel.ClassId     = int.Parse(classid);
                                classmodel.IsFinish    = 2;
                                classmodel.LastRecTime = DateTime.Now;
                                classmodel.LastRecUser = Com.SoureSession.Soureuserid;
                                if (classbll.UpdateStat(classmodel))
                                {
                                    SchSystem.BLL.SchClassUser scuBll = new SchSystem.BLL.SchClassUser();
                                    // bool ecu = scuBll.ExistsClassUser(int.Parse(schid), int.Parse(classid));
                                    bool scubool = scuBll.Delete(classid, schid);
                                    //if (scubool)
                                    // {
                                    ret = "success";
                                    //}
                                }
                                else
                                {
                                    ret = "操作失败";
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    ret = ex.Message;
                }
            }
            return(ret);
        }
        public static string udel(string schid, string id)
        {
            if (!Com.Public.isVa(schid, ""))
            {
                return("无跨界权限");
            }
            string ret = "";

            if (Com.Session.userid == null)
            {
                ret = "expire";
            }
            else
            {
                try
                {
                    SchSystem.BLL.SchSubLeader sslBll = new SchSystem.BLL.SchSubLeader();
                    bool sslBool = sslBll.ExistsClassSubLeader(schid, id);
                    if (sslBool)
                    {
                        ret = "success01";
                    }
                    else
                    {
                        SchSystem.BLL.SchGradeUsers sguBll = new SchSystem.BLL.SchGradeUsers();
                        bool sguBool = sguBll.ExistsGradeUser(schid, id);
                        if (sguBool)
                        {
                            ret = "success02";
                        }
                        else
                        {
                            SchSystem.BLL.SchClassUser scuBll = new SchSystem.BLL.SchClassUser();
                            bool scuBooll = scuBll.ExistsClassUser(schid, id);
                            if (scuBooll)
                            {
                                ret = "success03";
                            }
                            else
                            {
                                SchSystem.BLL.SchUserInfo   bll   = new SchSystem.BLL.SchUserInfo();
                                SchSystem.Model.SchUserInfo model = new SchSystem.Model.SchUserInfo();
                                model.UserId      = int.Parse(id);
                                model.Stat        = 2;
                                model.LastRecTime = DateTime.Now;
                                model.LastRecUser = Com.Session.userid;
                                if (bll.UpdateStat(model))
                                {
                                    ret = "success";
                                }
                                else
                                {
                                    ret = "操作失败";
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    ret = ex.Message;
                }
            }
            return(ret);
        }
        public static string udel(string schid, string id)
        {
            string ret = "";

            Com.DataPack.DataRsp <Com.DataPack.UserInfo> rsp = Com.Public.UserFuncSoure(Com.SoureSession.jsid, Com.SoureSession.jstoken);
            if (rsp.code == "ERROR_TOKEN")
            {
                ret = "expire";
            }
            else
            {
                try
                {
                    SchSystem.BLL.SchSubLeader sslBll = new SchSystem.BLL.SchSubLeader();
                    bool sslBool = sslBll.ExistsClassSubLeader(schid, id);
                    if (sslBool)
                    {
                        ret = "success01";
                    }
                    else
                    {
                        SchSystem.BLL.SchGradeUsers sguBll = new SchSystem.BLL.SchGradeUsers();
                        bool sguBool = sguBll.ExistsGradeUser(schid, id);
                        if (sguBool)
                        {
                            ret = "success02";
                        }
                        else
                        {
                            SchSystem.BLL.SchClassUser scuBll = new SchSystem.BLL.SchClassUser();
                            bool scuBooll = scuBll.ExistsClassUser(schid, id);
                            if (scuBooll)
                            {
                                ret = "success03";
                            }
                            else
                            {
                                SchSystem.BLL.SchUserInfo   bll   = new SchSystem.BLL.SchUserInfo();
                                SchSystem.Model.SchUserInfo model = new SchSystem.Model.SchUserInfo();
                                model.UserId      = int.Parse(id);
                                model.Stat        = 2;
                                model.LastRecTime = DateTime.Now;
                                model.LastRecUser = Com.SoureSession.Soureuserid;
                                if (bll.UpdateStat(model))
                                {
                                    ret = "success";
                                }
                                else
                                {
                                    ret = "操作失败";
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    ret = ex.Message;
                }
            }
            return(ret);
        }