Exemplo n.º 1
0
        public JsonResult ListPhyDel()
        {
            #region 权限控制
            int[] iRangePage         = { AddPageNodeId, EditPageNodeId, DetailPageNodeId };
            int   iCurrentPageNodeId = RequestParameters.Pint("NodeId");
            int   iCurrentButtonId   = (int)EButtonType.PhyDelete;
            var   tempNoAuth         = Utits.IsOperateAuth(iRangePage, iCurrentPageNodeId, iCurrentButtonId);
            if (tempNoAuth.ErrorType != 1)
            {
                return(Json(tempNoAuth));
            }
            #endregion

            Guid ID = RequestParameters.PGuid("ids");
            if (ID == Guid.Empty)
            {
                var sRetrunModel = new ResultMessage();
                sRetrunModel.ErrorType      = 0;
                sRetrunModel.MessageContent = "参数错误.";
                return(Json(sRetrunModel));
            }

            var  cBll   = new UsersBll();
            bool isFlag = cBll.PhysicalDelete(ID, Utits.WelfareCentreID);
            if (isFlag)
            {
                var authNodeBll = new AuthNodeBll();
                authNodeBll.PhysicalDeleteByUserIDs(ID);
                var authNodeButtonBll = new AuthNodeButtonBll();
                authNodeButtonBll.PhysicalDeleteByUserIDs(ID);

                ParamState = "4";
                ParamID    = ID.ToString();
                var cLog = new LogsBll();
                cLog.Log(ParamID, ParamName, ParamState, Utits.CurrentUserID.ToString(), Utits.CurrentRealName.ToString(), Utits.WelfareCentreID.ToString(), Utits.ClientIPAddress.ToString());

                var sRetrunModel = new ResultMessage();
                sRetrunModel.ErrorType      = 1;
                sRetrunModel.MessageContent = "操作成功.";
                return(Json(sRetrunModel));
            }
            else
            {
                var sRetrunModel = new ResultMessage();
                sRetrunModel.ErrorType      = 0;
                sRetrunModel.MessageContent = "操作失败.";
                return(Json(sRetrunModel));
            }
        }