void AddVehicleCompleted(object sender, AddVehicleCompletedEventArgs e) { if (e.Result < 0) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ADDFAILED")); RefreshUI(RefreshedTypes.ProgressBar); RefreshUI(saveType); } else { if (oCard_add.Count == 0 && oCard_upd.Count == 0) { Utility.ShowMessageBox("ADD", false, true); RefreshUI(RefreshedTypes.ProgressBar); } else { _VM.Save_VICardAsync(oCard_add, oCard_upd); } // by ldx // 2011-08-09 // 保存并关闭不能关闭 RefreshUI(saveType); } }
void UpdateVehicleCompleted(object sender, UpdateVehicleCompletedEventArgs e) { RefreshUI(RefreshedTypes.HideProgressBar); if (e.Result > 0) { _VM.Save_VICardAsync(oCard_add, oCard_upd); //add by zl //RefreshUI(RefreshedTypes.HideProgressBar); Utility.ShowMessageBox("UPDATE", false, true); // by ldx // 2011-08-09 // 修改保存不能关闭 RefreshUI(saveType); } else { Utility.ShowMessageBox("UPDATE", false, false); } }