private async void SaveNotification_Clcik(object sender, RoutedEventArgs e) { if (isAddNewNotification) { if (notificationBLL.InsertNotification(notificationInfo.notificationModel)) { MsgHelper.RefreshDataGrid(); this.Close(); } else { await this.ShowMessageAsync("提示", "添加失败!"); } } else//修改 { if (notificationBLL.UpdateNotification(notificationInfo.notificationModel)) { this.Hide(); await this.ShowMessageAsync("提示", "修改成功!"); MsgHelper.RefreshDataGrid(); this.Close(); } else { await this.ShowMessageAsync("提示", "修改失败!"); } } }