private void GetCallRegisterCollectionByDate(DateTime?dateTime, string searchName) { this.ShowProgressBar = true; Task.Factory.StartNew(() => { this.Entity = CallRegistryAction.GetCallRegistries(this.DBConnectionString, searchName, dateTime); this.ShowProgressBar = false; }); }
private void DeleteCustomer(DialogResult dialogResult) { if (dialogResult == DialogResult.Ok) { Task.Factory.StartNew(() => { CallRegistryAction.DeleteCallRegistries(this.DBConnectionString, this.Entity.InternalList.Where(x => x.IsSelected)); GetCallRegisterCollectionByDate(this.SearchDateTime, this.SearchName); ShowProgressBar = false; }); } else { ShowProgressBar = false; } }
private void OnSaveCallLog() { var returnStatus = false; returnStatus = !IsInEditMode?CallRegistryAction.AddCallLog(this.DBConnectionString, this.Entity) : CallRegistryAction.UpdateCallRegistry(this.DBConnectionString, this.Entity); if (returnStatus) { if (RefreshCallRegistry != null) { this.RefreshCallRegistry(this.Entity.CallDate); } var messageDailog = new MessageDailog() { Caption = Resources.MessageResources.DataSavedSuccessfully, DialogButton = DialogButton.Ok, Title = Resources.TitleResources.Information }; MessengerInstance.Send(messageDailog); if (this.CloseWindow != null) { this.CloseWindow(); } } else { var messageDailog = new MessageDailog() { Caption = Resources.MessageResources.DataSavedFailed, DialogButton = DialogButton.Ok, Title = Resources.TitleResources.Error }; MessengerInstance.Send(messageDailog); } }