/// <summary> /// Update Control when Selected Guid changes. /// </summary> private void gvMessages_SelectedValueChanged(object sender, EventArgs e) { if (_response == null) { return; } _selectedMessage = _response.Messages.SingleOrDefault(m => m.Id.ToString() == gvMessages.CurrentRow.Cells[0].Value.ToString()); if (_selectedMessage == null) { return; } messageControl.From = _selectedMessage.From.Value; messageControl.To = string.Join("; ", _selectedMessage.To.Select(m => m.Value)); messageControl.CC = string.Join("; ", _selectedMessage.CC.Select(m => m.Value)); messageControl.Subject = _selectedMessage.Subject; messageControl.Body = _selectedMessage.Body; messageControl.MessageId = _selectedMessage.Id.ToString(); //Bind Attachments Grid View gvAttachments.DataSource = _selectedMessage.Attachments; //Bind Dispositions Grid View bindDispositionRows(); }
/// <summary> /// Update Control when Selected Guid changes. /// </summary> private void gvMessages_SelectedValueChanged(object sender, EventArgs e) { if (_response == null) return; _selectedMessage = _response.Messages.SingleOrDefault(m => m.Id.ToString() == gvMessages.CurrentRow.Cells[0].Value.ToString()); if (_selectedMessage == null) return; messageControl.From = _selectedMessage.From.Value; messageControl.To = string.Join("; ", _selectedMessage.To.Select(m => m.Value)); messageControl.CC = string.Join("; ", _selectedMessage.CC.Select(m => m.Value)); messageControl.Subject = _selectedMessage.Subject; messageControl.Body = _selectedMessage.Body; messageControl.MessageId = _selectedMessage.Id.ToString(); //Bind Attachments Grid View gvAttachments.DataSource = _selectedMessage.Attachments; //Bind Dispositions Grid View bindDispositionRows(); }