コード例 #1
0
 public int ReDelete(DeleteUnitParameter parameter)
 {
     this.ExecuteSQL    = "UPDATE dbo.unit SET deleted=@deleted WHERE unitid=@unitid";
     this.DataParameter = new IDbDataParameter[]
     {
         new SqlParameter("@deleted", parameter.Deleted),
         new SqlParameter("@unitid", parameter.UnitId)
     };
     return(this.ExecuteNonQuery());
 }
コード例 #2
0
        public RespondWebViewData <RespondDeleteUnitViewModel> ReDeleteUnit(RequestWebViewData <RequestDeleteUnitViewModel> request)
        {
            var respond   = new RespondWebViewData <RespondDeleteUnitViewModel>(WebViewErrorCode.Exception);
            var parameter = new DeleteUnitParameter
            {
                UnitId  = request.data.UnitId,
                Deleted = (short)CommonDeleted.NotDeleted
            };
            var dataResult = this.mUnitDataAccess.ReDelete(parameter);

            if (dataResult <= 0)
            {
                return(respond);
            }
            respond = new RespondWebViewData <RespondDeleteUnitViewModel>(WebViewErrorCode.Success);
            MemcacheHelper.RemoveBy(ServiceMemcachedKeyManageConst.BasicUnit);

            //由于电脑配置不上mongodb固暂时先屏蔽掉此段mongodb的数据操作
            //this.SaveMongoDbData("恢复删除部门资料", request, respond, this.GetType());
            return(respond);
        }