コード例 #1
0
 public int ReDelete(DeleteEmployeeParameter parameter)
 {
     this.ExecuteSQL    = "UPDATE dbo.employee SET deleted=@deleted WHERE empid=@empid";
     this.DataParameter = new IDbDataParameter[]
     {
         new SqlParameter("@deleted", parameter.Deleted),
         new SqlParameter("@empid", parameter.empid)
     };
     return(this.ExecuteNonQuery());
 }
コード例 #2
0
        public RespondWebViewData <RespondDeleteEmployeeViewModel> ReDeleteEmployee(RequestWebViewData <RequestDeleteEmployeeViewModel> request)
        {
            var respond   = new RespondWebViewData <RespondDeleteEmployeeViewModel>(WebViewErrorCode.Exception);
            var parameter = new DeleteEmployeeParameter
            {
                empid   = request.data.EmpId,
                Deleted = (short)CommonDeleted.NotDeleted
            };
            var dataResult = this.mEmployeeDataAccess.ReDelete(parameter);

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

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