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); }