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
        private void insaBasic_Load(object sender, EventArgs e)
        {
            // 한번만 넣어주기
            if (CODE_.Count == 0)
            {
                _Code CD = new _Code();
                CODE_ = CD.CD_GET();
            }

            if (CODE_STORE.Count == 0)
            {
                CODE_INPUT("POS");
                CODE_INPUT("STS");
                CODE_INPUT("DUT");
                CODE_INPUT("MIL");
                CODE_INPUT("BNK");
                CODE_INPUT("DEPT");
            }

            // 리스트에 있는거 가져오기
            Form_Control frm_ctrl = new Form_Control();

            frm_ctrl.get_Combobox(this);
            foreach (Control a in CODE_STORE)
            {
                foreach (Control thisCtrl in frm_ctrl.get_control_list)
                {
                    if (thisCtrl.Tag != null)
                    {
                        if (thisCtrl.Tag.Equals(a.Tag))
                        {
                            foreach (string b in (a as ComboBox).Items)
                            {
                                (thisCtrl as ComboBox).Items.Add(b);
                            }
                        }
                    }
                }
            }

            if (insaSide.select_empno != null)
            {
                Control_Input_Date();
            }
        }