private void Sync(ORDR_SpecialOrder currentOrder) { if (!WebApiClient.IsAvailableConnection) { return; } // UPLOAD REPORT FILE currentOrder.FileName = currentOrder.ReportFileName; var pathFie = System.IO.Path.Combine(Config.ReportPath, currentOrder.ReportFileName); //if (!WebApiClient.Upload(Config.WhsCode, Path.Combine(Config.ReportPath, pathFie))) return; //// Sync Customer Product pircure. //if (currentOrder.ATC1_Attachments.Any()) //{ // currentOrder.ATC1_Attachments.Where(f => File.Exists(f.FileName)) // .ToList().ForEach(attch => WebApiClient.Upload(Config.WhsCode, attch.FileName)); //} var order = WebApiClient.AddSpecialOrder(currentOrder).Result; // update model from . currentOrder = SpecialOrdersHelper.GetOrder(currentOrder.IdSpecialOrder); currentOrder.UpdateModelPropertiesFrom(order.Model); order.UpdateEntityVersion(); }