using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Xml;


namespace LoginFrame
{
    public partial class Frm主面 : Form
    {
        public Frm主面()
        {
            InitializeComponent();
        }
        //现在时间
        private void timer1_Tick(object sender, EventArgs e)
        {
            tool_NowTime.Text = DateTime.Now.ToString();
        }

        //退出系统
        private void toolStripMenuItem6_Click(object sender, EventArgs e)
        {
            DialogResult button = MessageBox.Show("确定要退出系统?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk);

            if (button == DialogResult.Yes)
            {
                Application.ExitThread();
            }
        }


        private void toolStripLabel16_Click(object sender, EventArgs e)
        {
            DialogResult button = MessageBox.Show("确定要退出系统?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk);

            if (button == DialogResult.Yes)
            {
                Application.ExitThread();
            }
        }

        /// <summary>
        /// 窗体加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Frm主面_Load(object sender, EventArgs e)
        {
            this.tool_UserName.Text = LoginRoler.U_Name;//用户名

            if (LoginRoler.U_ROlesType == 1)
            {
                //toolStripMenuItem8.Visible = false;
                toolStripButton3.Visible = false;
                toolStripButton4.Visible = false;
                toolStripButton5.Visible = false;
                toolStripSeparator2.Visible = false;
                toolStripButton6.Visible = false;
                toolStripMenuItem7.Visible = false;
                toolStripButton7.Visible = false;
                toolStripMenuItem2.Visible = false;
                toolStripMenuItem11.Visible = false;
            }
            else//管理员
            {

                toolStripMenuItem2.Visible = false;
                toolStripMenuItem11.Visible = false;
                toolStripButton1.Visible = false;
                toolStripButton2.Visible = false;
                toolStripSeparator4.Visible = false;
                toolStripLabel10.Visible = false;
                toolStripLabel11.Visible = false;
                toolStripSeparator3.Visible = false;
            }
        }
        //个人信息
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Frm个人信息 frm = new Frm个人信息();
            frm.Message(LoginRoler.U_Id, "Update");
            frm.ShowDialog();
        }
        //密码修改
        private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            new Common().UpdatePassword();
        }
        //离开挂起
        private void toolStripMenuItem5_Click(object sender, EventArgs e)
        {
            new Common().KeepLeve();
        }
        //密码修改
        private void toolStripLabel2_Click(object sender, EventArgs e)
        {
            toolStripMenuItem4_Click(sender, e);
        }
        //离开挂起
        private void toolStripLabel3_Click(object sender, EventArgs e)
        {
            toolStripMenuItem5_Click(sender, e);
        }
        //用户管理
        private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Frm人员管理 frm = new Frm人员管理();
            frm.ShowDialog();
        }
        //管理员管理
        private void 管理员管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Frm管理员管理 frm = new Frm管理员管理();
            frm.ShowDialog();
        }
        //用户管理
        private void toolStripButton6_Click(object sender, EventArgs e)
        {
            用户管理ToolStripMenuItem_Click(sender, e);
        }
        //管理员管理
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            管理员管理ToolStripMenuItem_Click(sender, e);
        }
        //站点维护
        private void toolStripButton7_Click(object sender, EventArgs e)
        {
         
        }
        //车次管理
        //车次管理
        private void toolStripButton5_Click(object sender, EventArgs e)
        {
           
        }
        //列车管理
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
          
        }
        //列车管理
        private void 车票管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            toolStripButton3_Click(sender, e);
        }
        //车次
        private void toolStripLabel10_Click(object sender, EventArgs e)
        {
           
        }
        //站点维护
        private void 站点维护ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            toolStripButton7_Click(sender, e);
        }
        //车次
        private void toolStripMenuItem12_Click(object sender, EventArgs e)
        {
            toolStripLabel10_Click(sender, e);
        }
        //Frm车票查询
        private void toolStripLabel11_Click(object sender, EventArgs e)
        { 
        }
        //Frm车票查询
        private void 个检信息分析ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            toolStripLabel11_Click(sender, e);
        }
        //订票记录
        private void toolStripButton2_Click(object sender, EventArgs e)
        { 
        }
        //订票记录
        private void 订票记录ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            toolStripButton2_Click(sender, e);
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        { 
        }

        private void 退票记录ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            toolStripButton1_Click(sender, e);
        }

        private void toolStripMenuItem16_Click(object sender, EventArgs e)
        {
            new Common().ShowHelp();
        }

        private void toolStripMenuItem17_Click(object sender, EventArgs e)
        {
            new Common().ShowAbout();
        }

        //添加学院信息
        private void CollegeInfoAdd_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddCollegeInfo frmAddCollegeInfo = new FrmAddCollegeInfo();
            frmAddCollegeInfo.ShowDialog();
        }
        //学院信息管理
        private void CollegeInfoManage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQueryCollegeInfo frmQueryCollegeInfo = new FrmQueryCollegeInfo();
            frmQueryCollegeInfo.ShowDialog();
        }

        //添加专业信息
        private void SpecialFieldInfoAdd_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddSpecialFieldInfo frmAddSpecialFieldInfo = new FrmAddSpecialFieldInfo();
            frmAddSpecialFieldInfo.ShowDialog();
        }
        //专业信息管理
        private void SpecialFieldInfoManage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQuerySpecialFieldInfo frmQuerySpecialFieldInfo = new FrmQuerySpecialFieldInfo();
            frmQuerySpecialFieldInfo.ShowDialog();
        }

        //添加班级信息
        private void ClassInfoAdd_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddClassInfo frmAddClassInfo = new FrmAddClassInfo();
            frmAddClassInfo.ShowDialog();
        }
        //班级信息管理
        private void ClassInfoManage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQueryClassInfo frmQueryClassInfo = new FrmQueryClassInfo();
            frmQueryClassInfo.ShowDialog();
        }

        //添加学生信息
        private void Student_QQ287307421Add_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddStudent_QQ287307421 frmAddStudent_QQ287307421 = new FrmAddStudent_QQ287307421();
            frmAddStudent_QQ287307421.ShowDialog();
        }
        //学生信息管理
        private void Student_QQ287307421Manage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQueryStudent_QQ287307421 frmQueryStudent_QQ287307421 = new FrmQueryStudent_QQ287307421();
            frmQueryStudent_QQ287307421.ShowDialog();
        }

        //添加教师信息
        private void Teacher_QQ287307421Add_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddTeacher_QQ287307421 frmAddTeacher_QQ287307421 = new FrmAddTeacher_QQ287307421();
            frmAddTeacher_QQ287307421.ShowDialog();
        }
        //教师信息管理
        private void Teacher_QQ287307421Manage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQueryTeacher_QQ287307421 frmQueryTeacher_QQ287307421 = new FrmQueryTeacher_QQ287307421();
            frmQueryTeacher_QQ287307421.ShowDialog();
        }

        //添加课程信息
        private void CourseInfo_QQ254540457Add_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddCourseInfo_QQ254540457 frmAddCourseInfo_QQ254540457 = new FrmAddCourseInfo_QQ254540457();
            frmAddCourseInfo_QQ254540457.ShowDialog();
        }
        //课程信息管理
        private void CourseInfo_QQ254540457Manage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQueryCourseInfo_QQ254540457 frmQueryCourseInfo_QQ254540457 = new FrmQueryCourseInfo_QQ254540457();
            frmQueryCourseInfo_QQ254540457.ShowDialog();
        }

        //添加选课信息
        private void StudentSelectCourseInfoAdd_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddStudentSelectCourseInfo frmAddStudentSelectCourseInfo = new FrmAddStudentSelectCourseInfo();
            frmAddStudentSelectCourseInfo.ShowDialog();
        }
        //选课信息管理
        private void StudentSelectCourseInfoManage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQueryStudentSelectCourseInfo frmQueryStudentSelectCourseInfo = new FrmQueryStudentSelectCourseInfo();
            frmQueryStudentSelectCourseInfo.ShowDialog();
        }

        //添加成绩信息
        private void ScoreInfoAdd_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddScoreInfo frmAddScoreInfo = new FrmAddScoreInfo();
            frmAddScoreInfo.ShowDialog();
        }
        //成绩信息管理
        private void ScoreInfoManage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQueryScoreInfo frmQueryScoreInfo = new FrmQueryScoreInfo();
            frmQueryScoreInfo.ShowDialog();
        }

        //添加新闻信息
        private void NewsAdd_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddNews frmAddNews = new FrmAddNews();
            frmAddNews.ShowDialog();
        }
        //新闻信息管理
        private void NewsManage_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmQueryNews frmQueryNews = new FrmQueryNews();
            frmQueryNews.ShowDialog();
        }


    }
}
