コード例 #1
0
        public async Task <ActionResult> Manage(int id)
        {
            await RunNotifications();

            var model = new ManageCRMViewModel();
            var crm   = _mapper.Map <CRMViewModel>(await _repo.GetCRMById(id));

            if (crm != null)
            {
                model.CRM = crm;
            }

            return(View(model));
        }
コード例 #2
0
        public async Task <ActionResult> ManageWithRevision(int id)
        {
            await RunNotifications();

            var model = new ManageCRMViewModel();
            var crm   = _mapper.Map <CRMViewModel>(await _repo.GetCRMById(id));

            if (crm != null)
            {
                model.CRM = crm;
                var revision = _mapper.Map <List <CRMRevisionHistoryModel> >(await _repo.GetCRMRevisionHistoryByCRMId(crm.Id));
                if (revision.Count > 0)
                {
                    model.RevisionHistorys = revision;
                }
            }

            return(View(model));
        }
コード例 #3
0
        public async Task <ActionResult> ManageWithEmail(int id)
        {
            await RunNotifications();

            var model = new ManageCRMViewModel();
            var crm   = _mapper.Map <CRMViewModel>(await _repo.GetCRMById(id));

            if (crm != null)
            {
                model.CRM = crm;
                var emails = _mapper.Map <List <CRMEmailHistoryModel> >(await _repo.GetCRMEmailHistoryByCRMId(crm.Id));
                if (emails.Count > 0)
                {
                    model.EmailHistorys = emails;
                }
            }

            return(View(model));
        }