示例#1
0
        public ActionResult SavePeerReviewDetail(PeerReview _objPeerReview)
        {
            var _message = GlobalConst.ConstantChar.StringBlank;

            _objPeerReview.PeerReviewName = _objPeerReview.PeerReviewName.Trim();

            if (_objPeerReview.PeerReviewID == GlobalConst.ConstantChar.Zero)
            {
                if (_iPaticipantService.addPeerReview(Mapper.Map <MMCService.PaticipantService.PeerReview>(_objPeerReview)) > 0)
                {
                    _message = GlobalConst.Message.SaveMessage;
                }
                else
                {
                    _message = GlobalConst.Message.ErrorMessage;
                }
            }
            else
            {
                if (_iPaticipantService.updatePeerReview(Mapper.Map <MMCService.PaticipantService.PeerReview>(_objPeerReview)) > 0)
                {
                    _message = GlobalConst.Message.UpdateMessage;
                }
                else
                {
                    _message = GlobalConst.Message.ErrorMessage;
                }
            }

            return(Json(_message, GlobalConst.ContentTypes.TextHtml));
        }
示例#2
0
        public void addPeerReview()
        {
            PeerReview _PeerReview = new PeerReview
            {
                PeerReviewName  = "dfgfdgd",
                PeerReviewEmail = "*****@*****.**",
                PeerReviewPhone = "2135649872",
                PeerReviewFax   = "64646456"
            };
            var _id = _PeerReviewRepository.addPeerReview(_PeerReview);

            Assert.IsTrue(_id > 0, "failed");
        }
示例#3
0
 public ActionResult SavePeerReviewDetail(int?id)
 {
     getNoOfReferralAccordingToProcessLevels();
     if (id != null)
     {
         PeerReview _objPeerReviewModel = Mapper.Map <PeerReview>(_iPaticipantService.getPeerReviewByID(id.Value));
         return(View(_objPeerReviewModel));
     }
     else
     {
         return(View());
     }
 }
示例#4
0
        public void updatePeerReview()
        {
            PeerReview _PeerReview = new PeerReview
            {
                PeerReviewID    = 1,
                PeerReviewName  = "FirstName2",
                PeerReviewEmail = "vLastName2",
                PeerReviewPhone = "2135649872",
                PeerReviewFax   = "563535345"
            };
            var _id = _PeerReviewRepository.updatePeerReview(_PeerReview);

            Assert.IsTrue(_id > 0, "failed");
        }
示例#5
0
 public int updatePeerReview(PeerReview _peerReview)
 {
     return(_peerReviewRepo.Update(_peerReview));
 }
示例#6
0
 public int addPeerReview(PeerReview _peerReview)
 {
     return(_peerReviewRepo.Add(_peerReview).PeerReviewID);
 }
示例#7
0
 public int updatePeerReview(PeerReview _peerReview)
 {
     return(_iPeerReviewRepository.updatePeerReview(Mapper.Map <DTO.PeerReview, MMC.Core.Data.Model.PeerReview>(_peerReview)));
 }