public bool NoVillageTransferPerson(NoVillageTransferPerson request)
 {
     using (var db = DbFactory.Open())
     {
         var adcdInfo = ZZTXManager.GetADCDInfoByADCD(request.adcd);
         var info     = new VillageTransferPerson();
         info.adcd       = request.adcd;
         info.Year       = DateTime.Now.Year;
         info.IfTransfer = 1;
         if (AuditNums != null)
         {
             info.AuditNums = AuditNums + 1;
         }
         //新数据
         List <VillageTransferPerson> _newdata = new List <VillageTransferPerson>();
         _newdata.Add(info);
         //
         operateLog log = new operateLog();
         log.userName    = RealName;
         log.operateTime = DateTime.Now;
         log.operateMsg  = "" + DateTime.Now.Year + "年村" + adcdInfo.adnm + "提交了暂无危险区(点)转移人员的信息";
         List <operateLog> listLog = new List <operateLog>();
         listLog.Add(log);
         info.operateLog = JsonTools.ObjectToJson(listLog);
         var f = db.Single <VillageTransferPerson>(w => w.adcd == request.adcd && w.IfTransfer == 1);
         if (f == null)
         {
             var r = db.Insert(info) == 1;
             #region 日志
             StringBuilder sb = new StringBuilder();
             sb.Append("在栏目{组织责任/行政村危险区人员转移清单}下,新增数据{");
             sb.Append("村ADCD:" + adcdInfo.adnm + ";");
             sb.Append("},改村暂无危险区(点)转可移人员信息");
             _ILogHelper.WriteLog(sb.ToString(), OperationTypeEnums.新增);
             #endregion
             return(r);
         }
         else
         {
             return(false);
         }
     }
 }
Beispiel #2
0
 public bool POST(NoVillageTransferPerson request)
 {
     return(VillageTransferPersonManager.NoVillageTransferPerson(request));
 }