|
|
@ -41,7 +41,15 @@ namespace ButcherManage.Tools |
|
|
{ |
|
|
{ |
|
|
if (!AppContext.ConnectInfo.LocalOffline) |
|
|
if (!AppContext.ConnectInfo.LocalOffline) |
|
|
throw new Exception("非离线模式无需升级数据库"); |
|
|
throw new Exception("非离线模式无需升级数据库"); |
|
|
DbUtil.UpdateDatabase(AppContext.ConnectInfo.SqlConnection); |
|
|
|
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
DbUtil.UpdateDatabase(AppContext.ConnectInfo.SqlConnection); |
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
MessageBox.Show(string.Format("错误:{0}。详情:{1}", ex.Message, ex.StackTrace)); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
MessageBox.Show("数据库升级成功"); |
|
|
MessageBox.Show("数据库升级成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|