private void ClientForm_Load(object sender, EventArgs e) { var traces = _traceRepository.GetTraces(true).Result; var mapped = _mapper.Map <TraceDTO[]>(traces); List <ClientGridDTO> dataList = new List <ClientGridDTO>(); for (int i = 0; i < mapped.Length; i++) { var data = _mapper.Map <ClientGridDTO>(mapped[i]); dataList.Add(data); } clientGrid.DataSource = dataList; foreach (DataGridViewColumn col in clientGrid.Columns) { col.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; col.HeaderCell.Style.Font = new Font("Arial", 16F, FontStyle.Bold, GraphicsUnit.Pixel); } }
public List <TraceResult> DoInvoke(ITraceRepository repo) { return(repo.GetTraces()); }