Exemple #1
0
        public void LoadFormList()
        {
            tabControl1.TabPages.Clear();
            _getMenu      getMenu = new _getMenu();
            Form_Control  control = new Form_Control();
            List <string> Menus   = new List <string>();

            getMenu.child_menu(Menus, "인사기록관리");
            int count = -1;

            foreach (string Menu in Menus)
            {
                TabPage myTabPage = new TabPage(Menu);
                foreach (Form f in erpMain.Send_FormList)
                {
                    if (!f.Name.ToString().Contains("insaSelect"))
                    {
                        if (Menu.Equals(f.Tag))
                        {
                            f.TopLevel = false;
                            myTabPage.Controls.Add(f);
                            f.Show();
                            Type type = f.GetType();
                            control.get_control(f, true);
                            control.control_enabled(false, true);
                            if (f == (f as insaBasic))
                            {
                                MethodInfo method = type.GetMethod("Control_Input_Date");
                                method.Invoke(f, null);
                            }
                            else if (f == (f as Iinsa_Interface))
                            {
                                MethodInfo method = type.GetMethod("ShowData");
                                method.Invoke(f, null);
                            }
                        }
                    }
                }
                try
                {
                    count++;
                    if (count == 7)
                    {
                        break;
                    }
                    tabControl1.TabPages.Add(myTabPage);
                }
                catch { }
            }
        }
Exemple #2
0
        public erpMain()
        {
            InitializeComponent();
            if (Enabled_Check != true)
            {
                this.Enabled = false;

                Login login = new Login(this);
                login.Show();

                // 메뉴 데이터베이스에서 가져오기
                _getMenu getMenu = new _getMenu();
                // 부모 트리부터 설치
                getMenu.parent_menu(treeView1);
                // 자식 트리 설치
                getMenu.child_menu(treeView1, "인사기초정보");
                getMenu.child_menu(treeView1, "인사기록관리");
                getMenu.child_menu(treeView1, "인사변동관리");
                getMenu.child_menu(treeView1, "제증명서 발급");
                getMenu.child_menu(treeView1, "현황 및 통계");
                Enabled_Check = true;
            }
        }