public string PlaceOrder(IPlaceOrderRequest placeOrderRequest) { var kdbirdPlaceOrder = placeOrderRequest as KdBirdPlaceOrderRequest; var resultView = default(KdBirdPlaceOrderResult); SaleOrder sale = new SaleOrder(placeOrderRequest.OrderId, placeOrderRequest.OrderCode, KDBRID, kdbirdPlaceOrder.SerializeationData); try { var option = new HttpWebRequestOption(_connect.Host + PLACEORDER_METHOD); var resultStr = kdbirdPlaceOrder.Request(option, AbstractKDBirdRequest.PLACEORDER_REQUESTTYPE); resultView = kdbirdPlaceOrder.GetResult <KdBirdPlaceOrderResult>(resultStr); sale.SetPlaceOrderResult(resultStr, resultView.Success, resultView.Reason); _saleOrderRepository.Add(sale); _saleOrderRepository.Commit(); return(resultView.GetLogisticCode()); } catch (Exception ex) { if (resultView != default(KdBirdPlaceOrderResult)) { return(resultView.GetLogisticCode()); } return(string.Empty); } }