Пример #1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            //Call Dot Cap Plug Detail for this part number
            if (PartsL.PartExists(PartNoCombo.Text))
            {
                Part p1 = PartsL.SearchPart(PartNoCombo.Text);
                DotCapPlugForm f2 = new DotCapPlugForm(p1.PartNo, p1.Id);
                f2.ShowDialog();

                PartMaskLinkList pmList = new PartMaskLinkList(p1.Id);

                TotalCaplbl.Text = pmList.GetMaskTotal("Cap").ToString();
                TotalPlugslbl.Text = pmList.GetMaskTotal("Plug").ToString();
                TotalDotlbl.Text = pmList.GetMaskTotal("Dot").ToString();

            }
            else
            {
                MessageBox.Show("Part is not in Database");
            }
        }
Пример #2
0
        private void Object2Form(Part p)
        {
            PartMaskLinkList pmList;

            AA1TB.Text = p.Atomizing1.ToString();
            AA2TB.Text = p.Atomizing2.ToString();
            if (p.BlowExcessWater == "Y")
            {
                BlowCb.Checked = true;
            }
            else
            {
                BlowCb.Checked = false;
            }
            pmList = new PartMaskLinkList(p.Id);

            TotalCaplbl.Text = pmList.GetMaskTotal("Cap").ToString();
            TotalPlugslbl.Text = pmList.GetMaskTotal("Plug").ToString();
            TotalDotlbl.Text = pmList.GetMaskTotal("Dot").ToString();

            int Index2 = PartColorCombo.FindString(p.ColorName);
            PartColorCombo.SelectedIndex = Index2;
            CureTempTB.Text = p.CureTemp.ToString();
            PartDescTB.Text = p.PartDesc;

            FeetCB.Text = p.Feet.ToString();
            FR1TB.Text = p.FlowRate1.ToString();
            FR2TB.Text = p.FlowRate2.ToString();
            KV1TB.Text = p.Kv1.ToString();
            KV2TB.Text = p.Kv2.ToString();
            MaskTimeTB.Text = p.MaskTime.ToString();
            MillageTB.Text = p.Millage.ToString();
            MinConvCB.Text = p.MinConvSpeed.ToString();
            MinPartsPerTB.Text = p.MinPartsPerRack.ToString();
            MinPiecesTB.Text = p.MinPiecesPer.ToString();
            PaintTimelbl.Text = p.PaintTime.ToString();
            int Index = PartNoCombo.FindString(p.PartNo);
            PartNoCombo.SelectedIndex = Index;
            PoundsTB.Text = p.PoundsPer.ToString();
            powderlbl.Text = p.PowderNumber;
            if (p.PreMask == "Y")
            {
                PreMaskcb.Checked = true;
            }
            else
            {
                PreMaskcb.Checked = false;
            }
            REC1TB.Text = p.Receipe1;
            REC2TB.Text = p.Receipe2;
            SpecialNotesTB.Text = p.SpecialNotes;
            //SpotFaceTB.Text = p.SpotFace;
            SqFeetTB.Text = p.SqFeet.ToString();
            // Load Parts Combos
            PartsSelectedCustList.Items.Clear();
            PartsUnSelectedCustList.Items.Clear();
            PartsCustAddList = PartsL.LoadAssignedCustomers(p.Id);
            PartsCustDelList = PartsL.LoadUnAssignedCustomers(p.Id);
            foreach (string sPart in PartsCustAddList)
            {
                PartsSelectedCustList.Items.Add(sPart);
            }
            foreach (string sPart in PartsCustDelList)
            {
                PartsUnSelectedCustList.Items.Add(sPart);
            }
        }