Exemplo n.º 1
0
        public static void AddPerson(R_PersoninfInfo personInfo)
        {
            //添加到数据库
            var _personinf = ObjectConverter.Copy <R_PersoninfInfo, R_PersoninfModel>(personInfo);

            r_PersoninfRepository.AddPersoninf(_personinf);
            //更新到内存
            RPersoninfCacheAddRequest personRequest = new RPersoninfCacheAddRequest();

            personRequest.RPersoninfInfo = personInfo;
            rPersoninfCacheService.AddRPersoninfCache(personRequest);
        }
Exemplo n.º 2
0
        public BasicResponse <R_PersoninfInfo> AddPersoninf(R_PersoninfAddRequest personinfRequest)
        {
            var _personinf        = ObjectConverter.Copy <R_PersoninfInfo, R_PersoninfModel>(personinfRequest.PersoninfInfo);
            var resultpersoninf   = _Repository.AddPersoninf(_personinf);
            var personinfresponse = new BasicResponse <R_PersoninfInfo>();

            var addpersoninfo = ObjectConverter.Copy <R_PersoninfModel, R_PersoninfInfo>(resultpersoninf);

            addpersoninfo.deptName = personinfRequest.PersoninfInfo.deptName;
            addpersoninfo.zwDesc   = personinfRequest.PersoninfInfo.zwDesc;
            addpersoninfo.gzDesc   = personinfRequest.PersoninfInfo.gzDesc;
            personinfresponse.Data = addpersoninfo;
            //更新缓存
            RPersoninfCacheAddRequest addpersonrequest = new RPersoninfCacheAddRequest();

            addpersonrequest.RPersoninfInfo = addpersoninfo;
            _RPersoninfCacheService.AddRPersoninfCache(addpersonrequest);

            return(personinfresponse);
        }