public ShipmentManagerUi() { InitializeComponent(); _myShipmentsManager = new ShipmentsManager(); DtPickDateSince.SelectedDate = DateTime.Now; DtPickDateUntil.SelectedDate = DateTime.Now; }
private void SendPendingShipments() { _myShipmentsManager = new ShipmentsManager(); _sendShipmentsAgent = new BackgroundWorker { WorkerReportsProgress = true, WorkerSupportsCancellation = true }; _sendShipmentsAgent.DoWork += SendShipmentsAgentDoWork; _sendShipmentsAgent.RunWorkerCompleted += SendShipmentsAgentWorkComplete; if (_sendShipmentsAgent.IsBusy != true) { _sendShipmentsAgent.RunWorkerAsync(); } }