Ejemplo n.º 1
0
        private void InitTableContents()
        {
            try
            {
                string[] FacCode  = new string[] { "001", "099", "TOTAL1", "201", "202", "TOTAL2" };
                string[] FacTitle = new string[] { "F1 Support", "NOS N Support", "Total Support", "LD Assembly", "LE Assembly", "Total" };

                DataTable dt = SP_SMT_EMD_MENU_SELECT("Q");
                //for (int j = 0; j < tblContent.RowCount; j++)
                //{
                //    for (int i = 0; i < tblContent.ColumnCount; i++)
                //    {

                //        UC.UC_DSF_MGL_CARD MGL_CARD = new UC.UC_DSF_MGL_CARD();
                //        tblContent.Controls.Add(MGL_CARD, i, j);
                //        MGL_CARD.Tag = FacCode[iDx];
                //        UC_MGL_MENU[iDx] = MGL_CARD;
                //        MGL_CARD.BindingData(FacCode[iDx], FacTitle[iDx], null);
                //        MGL_CARD.BindingTree(dt);
                //        MGL_CARD.Dock = DockStyle.Fill;
                //        iDx++;
                //    }
                //}

                int j = 0;
                for (int i = 0; i < tblContent.ColumnCount; i++)
                {
                    UC.UC_DSF_MGL_CARD MGL_CARD = new UC.UC_DSF_MGL_CARD();
                    tblContent.Controls.Add(MGL_CARD, i, j);
                    MGL_CARD.Tag     = FacCode[iDx];
                    UC_MGL_MENU[iDx] = MGL_CARD;
                    MGL_CARD.BindingData(FacCode[iDx], FacTitle[iDx], null, _type.ToString());
                    MGL_CARD.BindingTree(dt);
                    MGL_CARD.Dock = DockStyle.Fill;
                    iDx++;
                }

                DataTable dt1 = SP_SMT_EMD_MENU_SELECT("Q2");
                j = 1;
                for (int i = 0; i < tblContent.ColumnCount; i++)
                {
                    UC.UC_DSF_MGL_CARD MGL_CARD = new UC.UC_DSF_MGL_CARD();
                    tblContent.Controls.Add(MGL_CARD, i, j);
                    MGL_CARD.Tag     = FacCode[iDx];
                    UC_MGL_MENU[iDx] = MGL_CARD;
                    MGL_CARD.BindingData(FacCode[iDx], FacTitle[iDx], null, _type.ToString());
                    MGL_CARD.BindingTree(dt1);
                    MGL_CARD.Dock = DockStyle.Fill;
                    iDx++;
                }
            }
            catch (Exception ex) { }
        }
Ejemplo n.º 2
0
        private void InitTableContents()
        {
            string[]  FacCode  = new string[] { "VJ1", "VJ2", "TOT" };
            string[]  FacTitle = new string[] { "VJ1 Support", "VJ2 Support", "Total Support" };
            DataTable dt       = SP_SMT_EMD_MENU_SELECT("Q");

            for (int i = 0; i < tblContent.ColumnCount; i++)
            {
                UC.UC_DSF_MGL_CARD MGL_CARD = new UC.UC_DSF_MGL_CARD();
                tblContent.Controls.Add(MGL_CARD, i, 0);
                UC_MGL_MENU[i] = MGL_CARD;
                MGL_CARD.BindingTree(dt);
                MGL_CARD.Dock = DockStyle.Fill;
            }
        }