private static void GetBookingSearch(object sender, DoWorkEventArgs e) { var parameters = e.Argument as Tuple <string, string>; if (parameters != null) { using (var context = new NeuronOscEntitites(NeuronOSCStorage.EntityConnectionString)) { NoCita output = context.PRO_SearchBooking(parameters.Item1, parameters.Item2).FirstOrDefault().ToNoCitaInfo(); e.Result = output; } } }
internal static NoCita FromPRO_SearchBooking_ResultToNoCitaInfo(PRO_SearchBooking_Result result) { var output = new NoCita { FullName = result.Nombre, FirstName = result.PrimerNombre, MiddleName = result.SegundoNombre, LastName = result.PrimerApellido, AdditionalLastName = result.SegundoApellido, IdDocument = result.DocumentoIdentidad, IdDocumentType = result.TipoIdentificacion, UniqueDocumentId = result.NumeroUnicoDocumento, BookingNumber = result.NoCita, BookingDate = result.FechaHoraDesde, OriginalObject = result }; return(output); }