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)); }
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)); }
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)); }