Example #1
0
 private void F_Main_Load(object sender, EventArgs e)
 {
     F_Login FrmLogin = new F_Login();   //声时登录窗体,进行调用
     FrmLogin.Tag = 1;   //将登录窗体的Tag属性设为1,表示调用的是登录窗体
     FrmLogin.ShowDialog();
     FrmLogin.Dispose();
     statusStrip1.Items[2].Text = DataClass.MyMeans.Login_Name;
     if (DataClass.MyMeans.Login_n == 1)
     {
         Preen_Main();
     }
     DataClass.MyMeans.Login_n = 3;
     Tool_Help.Enabled = true;
 }
Example #2
0
        private void F_Main_Load(object sender, EventArgs e)
        {
            F_Login FrmLogin = new F_Login(); //声时登录窗体,进行调用

            FrmLogin.Tag = 1;                 //将登录窗体的Tag属性设为1,表示调用的是登录窗体
            FrmLogin.ShowDialog();
            FrmLogin.Dispose();
            //当调用的是登录窗体时
            if (DataClass.MyMeans.Login_n == 1)
            {
                Preen_Main();              //自定义方法,通过权限对窗体进行初始化
                MyMenu.PactDay(1);         //MyModule类中的自定义方法,用于查找指定时间内,过生日的职工
                MyMenu.PactDay(2);         //MyModule类中的自定义方法,用于查找合同到期的职工
            }
            DataClass.MyMeans.Login_n = 3; //将公共变量设为3,便于控制登录窗体的关闭
        }
Example #3
0
        public void Show_Form(string FrmName, int n) //窗体的调用
        {
            if (n == 1)                              //标识
            {
                if (FrmName == "人事档案管理")             //判断要打开的窗体的Text属性值
                {
                    F_MainFile FrmManFile = new F_MainFile();
                    FrmManFile.Text = "人事档案管理";
                    FrmManFile.ShowDialog();//显示窗口
                    FrmManFile.Dispose();
                }
                if (FrmName == "人事资料查询")
                {
                    F_ind FrmFind = new F_ind();
                    FrmFind.Text = "人事资料查询";
                    FrmFind.ShowDialog();
                    FrmFind.Dispose();
                }
                if (FrmName == "人事资料统计")
                {
                    F_Stat FrmStat = new F_Stat();
                    FrmStat.Text = "人事资料统计";
                    FrmStat.ShowDialog();
                    FrmStat.Dispose();
                }
                if (FrmName == "员工生日提示")
                {
                    F_ClewSet FrmClewSet = new F_ClewSet();
                    FrmClewSet.Text = "员工生日提示";
                    FrmClewSet.Tag  = 1;//用于判断窗体显示类型
                    FrmClewSet.ShowDialog();
                    FrmClewSet.Dispose();
                }
                if (FrmName == "员工合同提示")
                {
                    F_ClewSet FrmClewSet = new F_ClewSet();
                    FrmClewSet.Text = "员工合同提示";
                    FrmClewSet.Tag  = 2;//用于判断窗体显示类型
                    FrmClewSet.ShowDialog();
                    FrmClewSet.Dispose();
                }
                if (FrmName == "日常记事")
                {
                    F_WordPad FrmWordPad = new F_WordPad();
                    FrmWordPad.Text = "日常记事";
                    FrmWordPad.ShowDialog();
                    FrmWordPad.Dispose();
                }
                if (FrmName == "通讯录")
                {
                    F_AddressList FrmAddressList = new F_AddressList();
                    FrmAddressList.Text = "通讯录";
                    FrmAddressList.ShowDialog();
                    FrmAddressList.Dispose();
                }

                if (FrmName == "重新登录")
                {
                    F_Login FrmLogin = new F_Login();
                    FrmLogin.Tag = 2;
                    FrmLogin.ShowDialog();
                    FrmLogin.Dispose();
                }

                if (FrmName == "计算器")
                {
                    System.Diagnostics.Process.Start("calc.exe");
                }
                if (FrmName == "记事本")
                {
                    System.Diagnostics.Process.Start("notepad.exe");
                }
                if (FrmName == "系统帮助")
                {
                    //System.Diagnostics.Process.Start("readme.doc");
                }
            }
            if (n == 2)
            {
                String FrmStr = "";
                if (FrmName == "民族类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_Folk"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_Folk";               //表名
                    DataClass.MyMeans.Mean_Field = "FolkName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "职工类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_EmployeeGenre"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_EmployeeGenre";               //表名
                    DataClass.MyMeans.Mean_Field = "EmployeeName";                   //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "文化类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_Culture"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_Culture";               //表名
                    DataClass.MyMeans.Mean_Field = "CultureName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "政治面貌设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_Visage"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_Visage";               //表名
                    DataClass.MyMeans.Mean_Field = "VisageName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "部门类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_Branch"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_Branch";               //表名
                    DataClass.MyMeans.Mean_Field = "BranchName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "工资类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_Laborage"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_Laborage";               //表名
                    DataClass.MyMeans.Mean_Field = "LaborageName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "职务类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_Business"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_Business";               //表名
                    DataClass.MyMeans.Mean_Field = "BusinessName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "职称类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_Duthcall"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_Duthcall";               //表名
                    DataClass.MyMeans.Mean_Field = "DuthcallName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "奖惩类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_RPKind"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_RPKind";               //表名
                    DataClass.MyMeans.Mean_Field = "RPKindName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                if (FrmName == "记事本类别设置")
                {
                    DataClass.MyMeans.Mean_SQL   = "select * from tb_WordPad"; //SQL语句
                    DataClass.MyMeans.Mean_Table = "tb_WordPad";               //表名
                    DataClass.MyMeans.Mean_Field = "WordPadName";              //添加修改的字段名
                    FrmStr = FrmName;
                }
                F_Basic FrmBasic = new F_Basic();
                FrmBasic.Text = FrmName;
                FrmBasic.ShowDialog();
                FrmBasic.Dispose();
            }
        }