⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cw_main.cs

📁 此系统开发了一个公交车管理系统。系统根据权限的不同
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace CarManage
{
    public partial class CW_Main : Form
    {
        public CW_Main()
        {
            InitializeComponent();
        }

        private void 工人工资管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_gongzi CWg = new CW_gongzi();
                CWg.MdiParent = this;
                CWg.Show();
            }
            else
            {
                CW_gongzi CWg = new CW_gongzi();
                CWg.MdiParent = this;
                CWg.Show();
            }
        }

        private void 工人工资查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_gongzi CWg = new CW_gongzi();
                CWg.MdiParent = this;
                CWg.Show();
            }
            else
            {
                CW_gongzi CWg = new CW_gongzi();
                CWg.MdiParent = this;
                CWg.Show();
            }
        }

        private void 配件购买ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_peijian CWp = new CW_peijian();
                CWp.MdiParent = this;
                CWp.Show();
            }
            else
            {
                CW_peijian CWp = new CW_peijian();
                CWp.MdiParent = this;
                CWp.Show();
            }
        }

        private void 配件使用ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_peijian CWp = new CW_peijian();
                CWp.MdiParent = this;
                CWp.Show();
            }
            else
            {
                CW_peijian CWp = new CW_peijian();
                CWp.MdiParent = this;
                CWp.Show();
            }
        }
        private void 配件信息查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_peijian CWp = new CW_peijian();
                CWp.MdiParent = this;
                CWp.Show();
            }
            else
            {
                CW_peijian CWp = new CW_peijian();
                CWp.MdiParent = this;
                CWp.Show();
            }
        }

        private void 修车管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Car_Repair CWCR = new CW_Car_Repair();
                CWCR.MdiParent = this;
                CWCR.Show();
            }
            else
            {
                CW_Car_Repair CWCR = new CW_Car_Repair();
                CWCR.MdiParent = this;
                CWCR.Show();
            }
        }

        private void 修车信息查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Car_Repair CWCR = new CW_Car_Repair();
                CWCR.MdiParent = this;
                CWCR.Show();
            }
            else
            {
                CW_Car_Repair CWCR = new CW_Car_Repair();
                CWCR.MdiParent = this;
                CWCR.Show();
            }
        }

        private void 车辆事故管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Car_Acc CWCA = new CW_Car_Acc();
                CWCA.MdiParent = this;
                CWCA.Show();
            }
            else
            {
                CW_Car_Acc CWCA = new CW_Car_Acc();
                CWCA.MdiParent = this;
                CWCA.Show();
            }
        }

        private void 车辆事故查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Car_Acc CWCA = new CW_Car_Acc();
                CWCA.MdiParent = this;
                CWCA.Show();
            }
            else
            {
                CW_Car_Acc CWCA = new CW_Car_Acc();
                CWCA.MdiParent = this;
                CWCA.Show();
            }
        }

        private void 月票管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Yuepiao CWY = new CW_Yuepiao();
                CWY.MdiParent = this;
                CWY.Show();
            }
            else
            {
                CW_Yuepiao CWY = new CW_Yuepiao();
                CWY.MdiParent = this;
                CWY.Show();
            }
        }

        private void 月票信息查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Yuepiao CWY = new CW_Yuepiao();
                CWY.MdiParent = this;
                CWY.Show();
            }
            else
            {
                CW_Yuepiao CWY = new CW_Yuepiao();
                CWY.MdiParent = this;
                CWY.Show();
            }
        }

        private void 票款和油耗管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Oil_Ticket CWOT = new CW_Oil_Ticket();
                CWOT.MdiParent = this;
                CWOT.Show();
            }
            else
            {
                CW_Oil_Ticket CWOT = new CW_Oil_Ticket();
                CWOT.MdiParent = this;
                CWOT.Show();
            }
        }

        private void 票款和油耗信息查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Oil_Ticket CWOT = new CW_Oil_Ticket();
                CWOT.MdiParent = this;
                CWOT.Show();
            }
            else
            {
                CW_Oil_Ticket CWOT = new CW_Oil_Ticket();
                CWOT.MdiParent = this;
                CWOT.Show();
            }
        }

        private void 包车管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Baoche CWB = new CW_Baoche();
                CWB.MdiParent = this;
                CWB.Show();
            }
            else
            {
                CW_Baoche CWB = new CW_Baoche();
                CWB.MdiParent = this;
                CWB.Show();
            }
        }

        private void baochexToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close(); //关闭已经打开的子窗体 
                CW_Baoche CWB = new CW_Baoche();
                CWB.MdiParent = this;
                CWB.Show();
            }
            else
            {
                CW_Baoche CWB = new CW_Baoche();
                CWB.MdiParent = this;
                CWB.Show();
            }
        }

      
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -