public string GetStatus(ObjectMakeCDResponse response)//bad name: confirm order { string UserID = response.userID.ToString(); var user =UserDB.GetUserByUserID(UserID); var orderID=user.addOrder(); var thread = new Thread(() => { var transportadora = new TransportadoraServiceClient(); var request = new TransportadoraServiceReference.TransportJobRequest(); request.DeliveryAdress = response.DeliveryAdress; request.Distance = response.Distance; request.encomendaID = orderID; request.userID = UserID; request.fabrica = response.fabrica; transportadora.TransportJob(request); }); thread.Start(); return "ack"; }
//bad name: confirm order public string GetStatus(ObjectMakeCDResponse response) { var userId = response.userID.ToString(CultureInfo.InvariantCulture); var user =UserDB.GetUserByUserID(userId); var orderId = user.addOrder(); var thread = new Thread(() => { var transportadora = new TransportadoraServiceClient(); var request = new TransportJobRequest { DeliveryAdress = response.DeliveryAdress, Distance = response.Distance, encomendaID = orderId, userID = userId, fabrica = response.fabrica }; transportadora.TransportJob(request); }); thread.Start(); return "ack"; }