private void btnRestart_Click(object sender, EventArgs e) { ServiceHelper.Stop("MSSQLSERVER"); ServiceHelper.Start("MSSQLSERVER", new string[0]); MessageDialog.ShowInformationMsgBox("重新启动MSSQL服务成功."); }
private void btnStop_Click(object sender, EventArgs e) { ServiceHelper.Stop("MSSQLSERVER"); MessageDialog.ShowInformationMsgBox("停止MSSQL服务成功."); }