Ejemplo n.º 1
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            select_empno = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
            label1.Text  = "선택한 사원: " + dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();

            if (erpMain.now_form != null)
            {
                Type type = erpMain.now_form.GetType();
                if (erpMain.now_form == (erpMain.now_form as insaBasic))
                {
                    MethodInfo method = type.GetMethod("Control_Input_Date");
                    method.Invoke(erpMain.now_form, null);
                    // 폼 컨트롤
                    Form_Control control = new Form_Control();
                    control.get_control(erpMain.now_form as Form, true);
                    control.control_enabled(true, false);
                }
                else if (erpMain.now_form == (erpMain.now_form as Iinsa_Interface))
                {
                    MethodInfo method = type.GetMethod("ShowData");
                    method.Invoke(erpMain.now_form, null);
                }
                else if (erpMain.now_form == (erpMain.now_form as insaSelect))
                {
                    MethodInfo method = type.GetMethod("LoadFormList");
                    method.Invoke(erpMain.now_form, null);
                }
            }
        }
Ejemplo n.º 2
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 { }
            }
        }
Ejemplo n.º 3
0
        // 폼 여러개 추가
        public void add_form(Form form)
        {
            if (saveForm != null)
            {
                saveForm.Close();
            }

            if (form.IsDisposed == false)
            {
                saveForm      = form;
                now_form      = form;
                form.TopLevel = false;
                form.Parent   = this.panel1;
                form.Show();

                // 그냥 폼 확인해서 다 다르게 CRUD 주자.
                if ((now_form as Form).Name.Contains("insa"))
                {
                    control.get_control(form, false);
                    control.control_enabled(false, false);
                    APPLY_Hide(true);
                    if (now_form != (now_form as insaBasic))
                    {
                        control.get_control(form, true);
                        control.control_enabled(true, true);
                        CRUD_Hide(false);
                    }
                    else
                    {
                        CRUD_ALL_Hide(true);
                    }
                }
                else if ((now_form as Form).Name.Contains("Code"))
                {
                    CRUD_ALL_Hide(false);
                    APPLY_Hide(true);
                    APPLY_Enabled(true);
                }
                else
                {
                    CRUD_ALL_Hide(false);
                    APPLY_Hide(false);
                }
            }
        }