Example #1
0
 public static Com.DataPack.DataRsp <string> udel(string id)
 {
     Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>();
     if (Com.Session.userid == null)
     {
         rsp.code = "expire";
         rsp.msg  = "页面已经过期,请重新登录";
     }
     else
     {
         try
         {
             if (!Com.Public.isVa(id, ""))
             {
                 rsp.code = "error";
                 rsp.msg  = "无跨界权限";
             }
             else if (id == Com.Public.getKey("adminschid"))
             {
                 rsp.code = "error";
                 rsp.msg  = "此为系统学校,不允许操作";
             }
             else
             {
                 SchSystem.BLL.SchInfo   bll   = new SchSystem.BLL.SchInfo();
                 SchSystem.Model.SchInfo model = new SchSystem.Model.SchInfo();
                 model.SchId       = int.Parse(id);
                 model.Stat        = 2;
                 model.LastRecTime = DateTime.Now;
                 model.LastRecUser = Com.Session.userid;
                 if (bll.UpdateStat(model))
                 {
                     rsp.code = "success";
                     rsp.msg  = "操作成功";
                 }
                 else
                 {
                     rsp.code = "error";
                     rsp.msg  = "操作失败";
                 }
             }
         }
         catch (Exception ex)
         {
             rsp.code = "error";
             rsp.msg  = ex.Message;
         }
     }
     return(rsp);
 }
Example #2
0
        public static string udel(string id)
        {
            string ret = "";

            if (Com.Session.userid == null)
            {
                ret = "expire";
            }
            else
            {
                try
                {
                    if (!Com.Public.isVa(id, ""))
                    {
                        return(ret = "无跨界权限");
                    }
                    if (id == Com.Public.getKey("adminschid"))
                    {
                        ret = "此为系统学校,不允许操作";
                    }
                    else
                    {
                        SchSystem.BLL.SchInfo   bll   = new SchSystem.BLL.SchInfo();
                        SchSystem.Model.SchInfo model = new SchSystem.Model.SchInfo();
                        model.SchId       = 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);
        }