private void NavigateToOpenSendNewMailViewCommand( KeyValuePair<string, string>[] parameters ) { var mail = new DirectMailDto { From = _currentContext.Staff.DirectEmailAddress, FromName = _currentContext.Staff.FullName, Sent = DateTime.Now }; _patientKey = parameters.GetValue<long> ( "PatientKey" ); var patientName = parameters.GetValue<string> ( "PatientFullName" ); if ( !string.IsNullOrEmpty ( patientName ) ) { mail.AttachmentName = string.Format ( "{0}.xml, Preview.html", DateTime.Now.Ticks ); } Mail = mail; }