Exemplo n.º 1
0
        /// <summary>
        /// 清空所有数据
        /// </summary>
        private void btnResetData_Click(object sender, RoutedEventArgs e)
        {
            bool result = Message.ShowConfirmMessage($"确认清空所有数据么?", this);

            if (result)
            {
                // 备份数据文件
                this.MakeBackup();
                // 删除数据
                service.DeleteAll();
                Message.ShowMessage("已成功清空所有数据", this, shutdownFlg: true);
                // 回到登录界面
                AccountBookCommon.ReLogin();
            }
        }