当然,如果是非系统管理员,则界面被限制
28
29
六、实现管理系统模块代码
using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
using System.Windows.Forms; using System.Data.SqlClient;
using System.Windows.Forms.DataVisualization.Charting;//chart的命令空间 namespace WindowsFormsApplication1 {
public partial class FormManage : Form {
//初始化参数
string ConnectionString=\ private SqlConnection conn = null; private SqlDataAdapter DataAdapter = null; private DataSet dataset = null; private SqlCommand cmd = null;
30
string curNo;
public FormManage() {
InitializeComponent(); }
/*-----界面转换方法开始!!-----*/ //显示主页背景
private void pIndex_Click(object sender, EventArgs e) {
checkPage(\主页\ }
//pFmyMng2的取消按钮,跳转到pShowData
private void addMemCancel_Click(object sender, EventArgs e) {
if (lAddData.Text == \添加成员\ {
checkPage(\家庭成员管理\ }
if (lAddData.Text == \添加项目\ {
checkPage(\收支项目管理\ }
31
}
//家庭成员管理
private void iFmyMng_Click(object sender, EventArgs e) {
checkPage(\家庭成员管理\ }
//重新登录
private void reLoad_Click(object sender, EventArgs e) {
this.Hide();
(new FormLogin()).ShowDialog(); this.Close(); }
//安全退出
private void exist_Click(object sender, EventArgs e) {
Application.Exit(); }
//添加成员按钮,跳转到pFmyMng2
private void iAddMem_Click(object sender, EventArgs e) {
checkPage(\添加成员\ }
32