Esempio n. 1
0
        void IProduct.FillTableLayoutPanel(TableLayoutPanel TLP, IRole UVO)
        {
            ZhgutVO wp = (ZhgutVO)this;

            TextBox    tb  = new TextBox();
            DBCategory dbc = new DBCategory("ZHGUTLIST");

            tb.Text     = dbc.GetName(wp.IDCat);
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            UIWorks.AddToTLP(TLP, "Категория", tb);

            tb = new TextBox();
            DBSubCategory dbsc = new DBSubCategory();

            tb.Text     = dbsc.GetName(wp.IDSubCat);
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            UIWorks.AddToTLP(TLP, "Подкатегория", tb);

            PathField pf = new PathField();

            pf.Tag = Roles.Inzhener;
            pf.Init(wp.ZHGUTPATH, true, false, false, true, Roles.Inzhener, "VIEWONLY", UVO, "ZHGUTPATH", null, this);
            pf.bDelVisible     = false;
            pf.bPathVisible    = false;
            pf.tbPath.Dock     = DockStyle.Fill;
            pf.Dock            = DockStyle.Fill;
            pf.bRemark.Visible = false;
            UIWorks.AddToTLP(TLP, "Изготовление жгута", pf);
        }
Esempio n. 2
0
        void IProduct.FillTableLayoutPanel(TableLayoutPanel TLP, IRole UVO)
        {
            //===============================================================Inzhener
            WPNameVO wp = (WPNameVO)this;

            if (wp.COMPOSITIONREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Inzhener;
                pf.Init(wp.COMPOSITION, true, false, false, true, Roles.Inzhener, "VIEWONLY", UVO, "COMPOSITION", null, wp);
                pf.bDelVisible  = false;
                pf.bPathVisible = false;
                pf.tbPath.Dock  = DockStyle.Fill;
                pf.Dock         = DockStyle.Fill;
                //pf.tbPath.Dock = DockStyle.Left;
                //pf.tbPath.Anchor = AnchorStyles.Left | AnchorStyles.Right;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "Состав изделия", pf);
            }
            if (wp.TECHREQREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Inzhener;
                pf.Init(wp.TECHREQ, true, false, false, true, Roles.Inzhener, "VIEWONLY", UVO, "TECHREQ", null, wp);
                pf.bDelVisible     = false;
                pf.bPathVisible    = false;
                pf.tbPath.Dock     = DockStyle.Fill;
                pf.Dock            = DockStyle.Fill;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "Технические требования", pf);
            }
            if (wp.CONFIGURATIONREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Inzhener;
                pf.Init(wp.CONFIGURATION, true, false, false, true, Roles.Inzhener, "VIEWONLY", UVO, "CONFIGURATION", null, wp);
                pf.bDelVisible     = false;
                pf.bPathVisible    = false;
                pf.tbPath.Dock     = DockStyle.Fill;
                pf.Dock            = DockStyle.Fill;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "Конфигурация", pf);
            }
            //===============================================================Constructor
            if (wp.DIMENSIONALDRAWINGREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Constructor;
                pf.Init(wp.DIMENDRAWING, true, false, false, true, Roles.Constructor, "VIEWONLY", UVO, "DIMENSIONALDRAWING", null, wp);
                pf.bDelVisible     = false;
                pf.bPathVisible    = false;
                pf.tbPath.Dock     = DockStyle.Fill;
                pf.Dock            = DockStyle.Fill;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "Габаритный чертёж", pf);
            }
            if (wp.SBORKA3DREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Constructor;
                pf.Init(wp.SBORKA3D, true, false, false, true, Roles.Constructor, "VIEWONLY", UVO, "SBORKA3D", null, wp);
                pf.bDelVisible     = false;
                pf.bPathVisible    = false;
                pf.tbPath.Dock     = DockStyle.Fill;
                pf.Dock            = DockStyle.Fill;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "3Д сборка", pf);
            }
            if (wp.MECHPARTSREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Constructor;
                pf.Init(wp.MECHPARTS, true, false, false, true, Roles.Constructor, "VIEWONLY", UVO, "MECHPARTS", null, wp);
                pf.bDelVisible     = false;
                pf.bPathVisible    = false;
                pf.tbPath.Dock     = DockStyle.Fill;
                pf.Dock            = DockStyle.Fill;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "Проект механических деталей", pf);
            }
            if (wp.SHILDSREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Constructor;
                pf.Init(wp.SHILDS, true, false, false, true, Roles.Constructor, "VIEWONLY", UVO, "SHILDS", null, wp);
                pf.bDelVisible     = false;
                pf.bPathVisible    = false;
                pf.tbPath.Dock     = DockStyle.Fill;
                pf.Dock            = DockStyle.Fill;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "Шильды", pf);
            }

            /*if (wp.PLANKAREQ)
             * {
             *  PathField pf = new PathField();
             *  pf.Tag = Roles.Constructor;
             *  pf.Init(wp.PLANKA, true, false, false, true, Roles.Constructor, UVO.Role);
             *  pf.bDelVisible = false;
             *  pf.bPathVisible = false;
             *  pf.tbPath.Width += 150;
             *  UIWorks.AddToTLP(TLP, "Планка фирменная", pf);
             * }*/
            if (wp.PACKAGINGREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Constructor;
                pf.Init(wp.PACKAGING, true, false, false, true, Roles.Constructor, "VIEWONLY", UVO, "PACKAGING", null, wp);
                pf.bDelVisible     = false;
                pf.bPathVisible    = false;
                pf.tbPath.Dock     = DockStyle.Fill;
                pf.Dock            = DockStyle.Fill;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "Упаковка", pf);
            }
            //===================================================================================TEHNOLOG

            //===================================================================================shemotehbik
            if (wp.WIRINGDIAGRAMREQ)
            {
                PathField pf = new PathField();
                pf.Tag = Roles.Shemotehnik;
                pf.Init(wp.WIRINGDIAGRAM, true, false, false, true, Roles.Shemotehnik, "VIEWONLY", UVO, "WIRINGDIAGRAM", null, wp);
                pf.bDelVisible     = false;
                pf.bPathVisible    = false;
                pf.tbPath.Dock     = DockStyle.Fill;
                pf.Dock            = DockStyle.Fill;
                pf.bRemark.Visible = false;
                UIWorks.AddToTLP(TLP, "Схема электрическая монтажная", pf);
            }



            //===================================================================================OTD
            //if (wp.PASSPORTREQ)
            //{
            //    PathField pf = new PathField();
            //    pf.Tag = Roles.OTD;
            //    pf.Init(wp.PASSPORT, true, false, false, true, Roles.OTD, UVO.Role, "VIEWONLY");
            //    pf.bDelVisible = false;
            //    pf.bPathVisible = false;
            //    pf.tbPath.Dock = DockStyle.Fill;
            //    pf.Dock = DockStyle.Fill;
            //    UIWorks.AddToTLP(TLP, "Паспорт/ЭТ", pf);
            //}
            //if (wp.MANUALREQ)
            //{
            //    PathField pf = new PathField();
            //    pf.Tag = Roles.OTD;
            //    pf.Init(wp.MANUAL, true, false, false, true, Roles.OTD, UVO.Role, "VIEWONLY");
            //    pf.bDelVisible = false;
            //    pf.bPathVisible = false;
            //    pf.tbPath.Dock = DockStyle.Fill;
            //    pf.Dock = DockStyle.Fill;
            //    UIWorks.AddToTLP(TLP, "РЭ", pf);
            //}
            //if (wp.PACKINGLISTREQ)
            //{
            //    PathField pf = new PathField();
            //    pf.Tag = Roles.OTD;
            //    pf.Init(wp.PACKINGLIST, true, false, false, true, Roles.OTD, UVO.Role, "VIEWONLY");
            //    pf.bDelVisible = false;
            //    pf.bPathVisible = false;
            //    pf.tbPath.Dock = DockStyle.Fill;
            //    pf.Dock = DockStyle.Fill;
            //    UIWorks.AddToTLP(TLP, "Лист упаковочный", pf);
            //}


            //===================================================================================OTK

            /*if (wp.SERIALREQ)
             * {
             *  PathField pf = new PathField();
             *  pf.Tag = Roles.OTK;
             *  pf.Init(wp.SERIAL, true, false, false, true, Roles.OTK, UVO.Role);
             *  pf.bDelVisible = false;
             *  pf.bPathVisible = false;
             *  pf.tbPath.Width += 150;
             *  UIWorks.AddToTLP(TLP, "Серийные номера", pf);
             * }*/

            TextBox tb = new TextBox();

            tb.Tag      = Roles.OTK;
            tb.Text     = wp.LENGTH;
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            if ((tb.Text == "") && (UVO.Role == Roles.OTK))
            {
                tb.BackColor = Color.Tomato;
            }
            UIWorks.AddToTLP(TLP, "Длина", tb);

            tb          = new TextBox();
            tb.Tag      = Roles.OTK;
            tb.Text     = wp.WIDTH;
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            if ((tb.Text == "") && (UVO.Role == Roles.OTK))
            {
                tb.BackColor = Color.Tomato;
            }
            UIWorks.AddToTLP(TLP, "Ширина", tb);

            tb          = new TextBox();
            tb.Tag      = Roles.OTK;
            tb.Text     = wp.HEIGHT;
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            if ((tb.Text == "") && (UVO.Role == Roles.OTK))
            {
                tb.BackColor = Color.Tomato;
            }
            UIWorks.AddToTLP(TLP, "Высота", tb);

            tb          = new TextBox();
            tb.Tag      = Roles.OTK;
            tb.Text     = wp.WEIGHT;
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            if ((tb.Text == "") && (UVO.Role == Roles.OTK))
            {
                tb.BackColor = Color.Tomato;
            }
            UIWorks.AddToTLP(TLP, "Вес", tb);
        }
Esempio n. 3
0
        void IProduct.FillTableLayoutPanel(TableLayoutPanel TLP, IRole UVO)
        {
            CableVO wp = (CableVO)this;

            TextBox    tb  = new TextBox();
            DBCategory dbc = new DBCategory("CABLELIST");

            tb.Text     = dbc.GetName(wp.IDCat);
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            UIWorks.AddToTLP(TLP, "Категория", tb);

            tb = new TextBox();
            DBSubCategory dbsc = new DBSubCategory();

            tb.Text     = dbsc.GetName(wp.IDSubCat);
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            UIWorks.AddToTLP(TLP, "Подкатегория", tb);

            PathField pf = new PathField();

            pf.Tag = Roles.Inzhener;
            pf.Init(wp.DIMENDRAWING, true, false, false, true, Roles.Inzhener, "VIEWONLY", UVO, "DIMENSIONALDRAWING_CABLE", null, wp);
            pf.bDelVisible     = false;
            pf.bPathVisible    = false;
            pf.tbPath.Width   += 150;
            pf.tbPath.Dock     = DockStyle.Fill;
            pf.Dock            = DockStyle.Fill;
            pf.bRemark.Visible = false;

            UIWorks.AddToTLP(TLP, "Сборочный чертёж", pf);

            pf     = new PathField();
            pf.Tag = Roles.Inzhener;
            pf.Init(wp.MECHPARTS, true, false, false, true, Roles.Inzhener, "VIEWONLY", UVO, "MECHPARTS_CABLE", null, wp);
            pf.bDelVisible     = false;
            pf.bPathVisible    = false;
            pf.tbPath.Width   += 150;
            pf.tbPath.Dock     = DockStyle.Fill;
            pf.Dock            = DockStyle.Fill;
            pf.bRemark.Visible = false;

            UIWorks.AddToTLP(TLP, "Проект мех. деталей", pf);

            tb          = new TextBox();
            tb.Text     = wp.CONECTORS;
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            UIWorks.AddToTLP(TLP, "Соединители", tb);

            tb          = new TextBox();
            tb.Text     = wp.CLENGTH;
            tb.Anchor   = AnchorStyles.Left | AnchorStyles.Right;
            tb.ReadOnly = true;
            tb.Dock     = DockStyle.Fill;
            UIWorks.AddToTLP(TLP, "Длина", tb);
        }