예제 #1
0
        private void butFloor_Click(object sender, EventArgs e)
        {
            frmFloor ft = new frmFloor();

            if (ft.ShowDialog() == DialogResult.OK)
            {
                flushfloor();
            }
        }
예제 #2
0
        /// <summary>
        /// 读取菜单中的信息.
        /// </summary>
        /// <param name="treeV">TreeView控件</param>
        public void frm_show(int n)
        {
            switch (n)//通过标识调用各子窗体
            {
            case 0: break;

            case 1:
            {
                frmPeopleInfo fp = new frmPeopleInfo(); //实例化一个frmPeopleInfo窗体
                fp.strID = "want";                      //设置窗体中的公共变量
                fp.Text  = "求租人员信息";                    //设置窗体的名称
                fp.ShowDialog();                        //用模试对话框打开窗体
                fp.Dispose();                           //释放窗体的所有资原
                break;
            }

            case 2:
            {
                frmPeopleInfo fp = new frmPeopleInfo();
                fp.strID = "lend";
                fp.Text  = "出租人员信息设置";
                fp.ShowDialog();
                fp.Dispose();
                break;
            }

            case 3:
            {
                frmPeopleList fp = new frmPeopleList();
                fp.ShowDialog();
                fp.Dispose();
                break;
            }

            case 4:
            {
                frmSelect fs = new frmSelect();
                fs.ShowDialog();
                fs.Dispose();
                break;
            }

            case 5:
            {
                frmStateHouse fs = new frmStateHouse();
                fs.ShowDialog();
                fs.Dispose();
                break;
            }

            case 6:
            {
                frmIntend fi = new frmIntend();
                fi.ShowDialog();
                fi.Dispose();
                break;
            }

            case 7:
            {
                frmEmploeey fe = new frmEmploeey();
                fe.ShowDialog();
                fe.Dispose();
                break;
            }

            case 8:
            {
                frmEmpleeyAll fe = new frmEmpleeyAll();
                fe.ShowDialog();
                fe.Dispose();
                break;
            }

            case 9:
            {
                frmType ft = new frmType();
                ft.ShowDialog();
                ft.Dispose();
                break;
            }

            case 10:
            {
                frmFloor ff = new frmFloor();
                ff.ShowDialog();
                ff.Dispose();
                break;
            }

            case 11:
            {
                frmSeat fs = new frmSeat();
                fs.ShowDialog();
                fs.Dispose();
                break;
            }

            case 12:
            {
                frmFitment ff = new frmFitment();
                ff.ShowDialog();
                ff.Dispose();
                break;
            }

            case 13:
            {
                frmFavor ff = new frmFavor();
                ff.ShowDialog();
                ff.Dispose();
                break;
            }

            case 14:
            {
                frmMothed fm = new frmMothed();
                fm.ShowDialog();
                fm.Dispose();
                break;
            }

            case 15:
            {
                frmMoney fm = new frmMoney();
                fm.ShowDialog();
                fm.Dispose();
                break;
            }

            case 16:
            {
                frmMoneyRemark fmr = new frmMoneyRemark();
                fmr.ShowDialog();
                fmr.Dispose();
                break;
            }

            case 17:
            {
                frmBargin fb = new frmBargin();
                fb.ShowDialog();
                fb.Dispose();
                break;
            }

            case 21:
            {
                //打开记事本
                System.Diagnostics.Process.Start("notepad.exe");
                break;
            }

            case 22:
            {
                //打开计算器
                System.Diagnostics.Process.Start("calc.exe");
                break;
            }

            case 23:
            {
                //打开WORD文档
                System.Diagnostics.Process.Start("WINWORD.EXE");
                break;
            }

            case 24:
            {
                //打开EXCEL文件
                System.Diagnostics.Process.Start("EXCEL.EXE");
                break;
            }

            case 25:
            {
                frmChangYouSelfPwd fcy = new frmChangYouSelfPwd();
                fcy.M_str_Name = this.tspname.Text.ToString();
                fcy.ShowDialog();
                fcy.Dispose();
                break;
            }

            case 26:
            {
                if (MessageBox.Show("确认退出系统吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    Application.Exit();        //关闭当前工程
                }
                break;
            }

            case 27:
            {
                frmStock fs = new frmStock();
                fs.ShowDialog();
                fs.Dispose();
                break;
            }

            case 28:
            {
                frmRestore fr = new frmRestore();
                fr.ShowDialog();
                fr.Dispose();
                break;
            }

            case 29:
            {
                ClsCon con = new ClsCon(); //实例化一个ClsCon公共类
                con.ConDatabase();         //连接数据库
                //调用一个清理出租人和房源之间的垃极信息
                //如当出租人来要出租房时可是没有给出他房源信息这时出租人信息就没有用了
                try
                {
                    SqlCommand cmd = new SqlCommand(); //实例化一个SqlCommand类
                    cmd.Connection = con.conn;         //与数据库建立关系统
                    cmd.Connection.Open();             //打开数据库的连接
                    cmd.CommandText = "proc_clear";    //存储过程的名
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.ExecuteNonQuery();             //执行存储过程
                    con.closeCon();                    //关闭数据库的连接
                    MessageBox.Show("恭喜已清除!!!");
                }
                catch (Exception ey)
                {
                    MessageBox.Show(ey.Message);
                }
                break;
            }

            case 30:
            {
                //打开帮助对话框
                MessageBox.Show("\t你可以到明日科技网站\t\n\n\t  得到你想知道的\n\t    谢谢使用!!");
                break;
            }
            }
        }