//---------------------------------------------------------------------------
        private void btToolCal_Click(object sender, RoutedEventArgs e)
        {
            //Auto Tool Calibration
            MAN.fn_ManProcOn((int)EN_MAN_LIST.MAN_0425, true, false);

            fn_WriteLog("[MASTER] Auto Tool Storage Calibration.");
        }
示例#2
0
        //---------------------------------------------------------------------------
        private void UserButton_Click_6(object sender, RoutedEventArgs e)
        {
            if (!m_bConnect || m_nAxis < 0)
            {
                return;
            }

            //mc_Acs.fn_SetBuffer(m_nAxis, true); //HOME

            int nHomeNo = MOTR.ManNoHome((EN_MOTR_ID)m_nAxis);

            if (!fn_UserMsg($"{STRING_MOTOR_ID[m_nAxis]} Motor Home?", EN_MSG_TYPE.Check))
            {
                return;
            }

            SEQ.fn_Reset();

            if (nHomeNo == 32) //Z-Axis
            {
                if (SEQ_SPIND.fn_IsExistTool() && !FM.fn_IsLvlMaster())
                {
                    fn_UserMsg("Please remove tool");
                    return;
                }
            }
            MAN.fn_ManProcOn(nHomeNo, true, false);
        }
        //---------------------------------------------------------------------------
        private void btStart_Click(object sender, RoutedEventArgs e)
        {
            //
            if (SEQ._bRun || SEQ._bAuto)
            {
                UserFunction.fn_UserMsg("Can't Work while RUN or Auto");
                return;
            }
            if (FM.fn_GetLevel() != (int)EN_USER_LEVEL.lvMaster)
            {
                UserFunction.fn_UserMsg("Please Change Master Level.");
                return;
            }
            int nDly = 0;

            int.TryParse(upStopDelay.UPValue, out nDly);

            bool isOk = ACTR.MoveCyl(m_nSelIndex, (int)EN_ACTR_CMD.Fwd);

            if (isOk)
            {
                ACTR.fn_Reset();
                MAN.fn_SetRptAct(-1, false, nDly);
                MAN.fn_SetRptAct(m_nSelIndex, true, nDly);
            }
        }
示例#4
0
        private void bn_AutoToolAlign_Click(object sender, RoutedEventArgs e)
        {
            //Auto Tool Calibration
            int cnt = 1;

            int.TryParse(tbCalCnt.Text, out cnt);
            fn_UpdateData();
            SEQ_SPIND._nAlignTestCount = cnt;
            MAN.fn_ManProcOn((int)EN_MAN_LIST.MAN_0425, true, false);

            fn_WriteLog("[MASTER] Auto Tool Storage Calibration.");
        }
示例#5
0
        //---------------------------------------------------------------------------
        private void lbAllHome_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            //
            if (fn_UserMsg("Do you want All Home?", EN_MSG_TYPE.Check))
            {
                //Home Seq.
                MAN.fn_ManProcOn((int)EN_MAN_LIST.MAN_0001, true, false);

                //Log
                fn_WriteLog("Click All Home");
            }
        }
示例#6
0
        //---------------------------------------------------------------------------
        private void btMove_PreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (!double.TryParse(tbSetPos.Text, out double dPos))
            {
                return;
            }

            if (dPos < 0)
            {
                return;
            }

            MAN._dDirectPos = dPos;

            int nManNo = (int)MOTR.ManNoDirect(EN_MOTR_ID.miSPD_X) + (25 * m_nSelMotr);

            MAN.fn_ManProcOn(nManNo, true, false);
        }
        //---------------------------------------------------------------------------
        private void btAutoCal_Click(object sender, RoutedEventArgs e)
        {
            int nCycle = 0;

            int.TryParse(lbCalCycle.Text, out nCycle);

            if (nCycle > 0 && nCycle < 20)
            {
                SEQ_SPIND._nTotalCalCycle = nCycle;
            }
            else
            {
                fn_UserMsg("Count 숫자를 확인하세요 (Count < 20)");
                return;
            }

            //Auto Calibration
            MAN.fn_ManProcOn((int)EN_MAN_LIST.MAN_0419, true, false);

            fn_WriteLog("[MASTER] Auto Calibration.");
        }
示例#8
0
        static TS856 BuildShipNotice(string controlNumber)
        {
            var result = new TS856();

            //  856 is the Transaction Set Identifier Code for the Advance Ship Notice
            //  0001 is the Transaction Set Control Number
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "856";
            result.ST.TransactionSetControlNumber_02  = controlNumber.PadLeft(9, '0');

            //  00 is the Transaction Set Purpose Code "00" indicates Original.
            //  01140824 is the Shipment Identification Number.
            //  20051015 is the Document Creation Date.
            //  1345 is the Time.
            //  0001 is the Hierarchical Structure. "0001" indicates "Pick and Pack Structure".
            result.BSN = new BSN();
            result.BSN.TransactionSetPurposeCode_01 = "00";
            result.BSN.ShipmentIdentification_02    = "10286631";
            result.BSN.Date_03 = "20200404";
            result.BSN.Time_04 = "1345";
            result.BSN.HierarchicalStructureCode_05 = "0001";

            //  Repeating HL Loops
            result.HLLoop = new List <Loop_HL_856>();

            //  Begin HL Loop 1
            var hlLoop1 = new Loop_HL_856();

            //  1 is Hierarchical ID Number.
            //  S is the Hierarchical Level Code. “S” indicates "Shipment".
            //  This HL is the first HL used, and has no parent to identify.
            hlLoop1.HL = new HL();
            hlLoop1.HL.HierarchicalIDNumber_01  = "1";
            hlLoop1.HL.HierarchicalLevelCode_03 = "S";

            //  Repeating TD1
            hlLoop1.TD1 = new List <TD1>();

            //  CTN25 is Packaging Code. “CTN” indicates “Carton”, and “25” indicates “Corrugated or Solid”.
            //  2 is the Lading Quantity.
            //  G is the Weight Qualifier. “G” indicates "Gross Weight".
            //  45582 is the Weight (Gross).
            //  LB is the Unit or Basis for Measurement Code. “LB” indicates “Pound”.
            //  1000 is the Volume (Gross).
            //  CF is the Unit or Basis for Measurement Code. “CF” indicates “Cubic Feet”.
            var td11 = new TD1();

            td11.PackagingCode_01   = "CTN25";
            td11.LadingQuantity_02  = "1";
            td11.WeightQualifier_06 = "G";
            td11.Weight_07          = "3";//??
            td11.UnitorBasisforMeasurementCode_08 = "LB";
            // td11.Volume_09 = "1000";
            // td11.UnitorBasisforMeasurementCode_10 = "CF";
            hlLoop1.TD1.Add(td11);

            //  Repeating TD5
            hlLoop1.TD5 = new List <TD5>();

            //  B is the Routing Sequence Code. “B” indicates "Origin/Delivery Carrier (Any Mode)".
            //  2 is the Identification Code Qualifier. “2” indicates “Standard Carrier Alpha Code(SCAC)”.
            //  JBHT is the Identification Code(SCAC).Indicates the carrier JB Hunt.
            //  M is the Transportation Method / Type Code. “M” indicates “Motor(Common Carrier)”.
            var td51 = new TD5();

            td51.RoutingSequenceCode_01          = "B";
            td51.IdentificationCodeQualifier_02  = "2";
            td51.IdentificationCode_03           = "FDEG";
            td51.TransportationMethodTypeCode_04 = "M";
            hlLoop1.TD5.Add(td51);

            //  Repeating TD3
            hlLoop1.TD3Loop = new List <Loop_TD3_856>();

            //  TL is the Equipment Description Code. “TL” indicates Trailer.
            //  ABCD is the Equipment Initial
            //  07213567 is the Equipment Number
            //  30394938483234 is the Seal Number.This is a unique number on seal used to close a shipment.

            /*  var td31 = new TD3();
             * td31.EquipmentDescriptionCode_01 = "TL";
             * td31.EquipmentInitial_02 = "ABCD";
             * td31.EquipmentNumber_03 = "07213567";
             * td31.SealNumber_09 = "30394938483234";
             * hlLoop1.TD3.Add(td31);*/

            //  Repeating REF
            hlLoop1.REF = new List <REF>();

            /*  //  BM is the Reference Identification Qualifier. “BM” indicates “Bill of Lading Number”.
             * //  01140824 is the Reference Identification
             * var ref1 = new REF();
             * ref1.ReferenceIdentificationQualifier_01 = "BM";
             * ref1.ReferenceIdentification_02 = "01140824";
             * hlLoop1.REF.Add(ref1);*/

            //  CN is the Reference Identification Qualifier “CN” indicates the Carrier PRO Tracking Number.
            //  082131 is the Reference Identification
            var ref2 = new REF();

            ref2.ReferenceIdentificationQualifier_01 = "CN";
            ref2.ReferenceIdentification_02          = "770156950710";
            hlLoop1.REF.Add(ref2);

            /* //  CR is the Reference Identification Qualifier “CR” indicates the Customer Reference Number(Wal - Mart Load Number).
             * //  01082131 is the Reference Identification
             * var ref3 = new REF();
             * ref3.ReferenceIdentificationQualifier_01 = "CR";
             * ref3.ReferenceIdentification_02 = "01082131";
             * hlLoop1.REF.Add(ref3);*/

            //  Repeating DTM
            hlLoop1.DTM = new List <DTM>();

            //  011 is the Date/Time Qualifier “011” indicates the “Date Shipped”
            //  20051015 is the Date (Shipped)
            var dtm1 = new DTM();

            dtm1.DateTimeQualifier_01 = "011";
            dtm1.Date_02 = "20200404";
            hlLoop1.DTM.Add(dtm1);

            //  Repeating N1 Loops
            hlLoop1.N1Loop = new List <Loop_N1_856>();

            //  Begin N1 Loop 1
            var n1Loop1 = new Loop_N1_856();

            //  ST is the Entity Identifier Code. “ST” indicates “Ship To”.
            //  WAL - MART DC 6094J - JIT is the Name (Ship To).
            //  UL is the Identification Code Qualifier. “UL” indicates
            //  “Global Location Number(GLN)”.
            //  0078742035260 is the Identification Code(GLN).
            n1Loop1.N1 = new N1();
            n1Loop1.N1.EntityIdentifierCode_01 = "ST";
            n1Loop1.N1.Name_02 = "WAL-MART SUPERCENTER 5260";
            n1Loop1.N1.IdentificationCodeQualifier_03 = "UL";
            n1Loop1.N1.IdentificationCode_04          = "0078742050027";

            //  End N1 Loop 1
            hlLoop1.N1Loop.Add(n1Loop1);

            //  Begin N1 Loop 2
            var n1Loop2 = new Loop_N1_856();

            //  SF is the Entity Identifier Code (Ship From)
            //  SUPPLIER NAME is the Name.
            n1Loop2.N1 = new N1();
            n1Loop2.N1.EntityIdentifierCode_01 = "SF";
            n1Loop2.N1.Name_02 = "RECONGROUP";

            //  End N1 Loop 2
            hlLoop1.N1Loop.Add(n1Loop2);

            //  End HL Loop 1
            result.HLLoop.Add(hlLoop1);

            //  Begin HL Loop 2
            var hlLoop2 = new Loop_HL_856();

            //  2 is the Hierarchical ID Number.
            //  1 is the Hierarchical Parent ID Number. (Shipment)
            //  O is the Hierarchical Level Code. “O” indicates “Order”
            hlLoop2.HL = new HL();
            hlLoop2.HL.HierarchicalIDNumber_01       = "2";
            hlLoop2.HL.HierarchicalParentIDNumber_02 = "1";
            hlLoop2.HL.HierarchicalLevelCode_03      = "O";

            //  9988776655 the Purchase Order Number.
            //  20051015 is the Date (Purchase Order Date).
            hlLoop2.PRF = new PRF();
            hlLoop2.PRF.PurchaseOrderNumber_01 = "3066040668";
            hlLoop2.PRF.Date_04 = "20200310";

            //  Repeating REF
            hlLoop2.REF = new List <REF>();

            //  IA is the Reference Identification Qualifier. “IA” indicates
            //  “Internal Vendor Number”.
            //  211555050 is the Reference Identification
            var ref4 = new REF();

            ref4.ReferenceIdentificationQualifier_01 = "IA";
            ref4.ReferenceIdentification_02          = "009167870";
            hlLoop2.REF.Add(ref4);

            //  DP is the Reference Identification Qualifier. “DP” indicates
            //  “Department Number”.
            //  00005 is the Reference Identification(Wal - Mart Department
            //  Number).
            var ref5 = new REF();

            ref5.ReferenceIdentificationQualifier_01 = "DP";
            ref5.ReferenceIdentification_02          = "00087";
            hlLoop2.REF.Add(ref5);

            //  MR is the Reference Identification Qualifier. “MR” indicates
            //  “Merchandise Type Code”.
            //  0073 is the Reference Identification
            var ref6 = new REF();

            ref6.ReferenceIdentificationQualifier_01 = "MR";
            ref6.ReferenceIdentification_02          = "0007";
            hlLoop2.REF.Add(ref6);

            /*  //  IV is the Reference Identification Qualifier. “IV” indicates
             * //  “Seller’s Invoice Number”.
             * //  01140824 is the Reference Identification
             * var ref7 = new REF();
             * ref7.ReferenceIdentificationQualifier_01 = "IV";
             * ref7.ReferenceIdentification_02 = "01140824";
             * hlLoop2.REF.Add(ref7);*/

            //  Repeating N1 Loops
            hlLoop2.N1Loop = new List <Loop_N1_856>();

            //  Begin N1 Loop 1
            var n1Loop3 = new Loop_N1_856();

            //  BY is the Entity Identifier Code. “BY” indicates “Buying
            //  Party(Purchaser)”.
            //  WAL - MART STORES, INC. is the Name.
            //  UL is the Identification Code Qualifier. “UL” indicates
            //  “Global Location Number(GLN)”.
            //  0078742000992 is the Identification Code(GLN).
            n1Loop3.N1 = new N1();
            n1Loop3.N1.EntityIdentifierCode_01 = "BY";
            n1Loop3.N1.Name_02 = "WAL-MART SUPERCENTER 5260";
            n1Loop3.N1.IdentificationCodeQualifier_03 = "UL";
            n1Loop3.N1.IdentificationCode_04          = "0078742050027";

            //  End N1 Loop 1
            hlLoop2.N1Loop.Add(n1Loop3);

            //  End HL Loop 2
            result.HLLoop.Add(hlLoop2);

            //  Begin HL Loop 3
            var hlLoop3 = new Loop_HL_856();

            //  3 is the Hierarchical ID Number.
            //  2 is the Hierarchical Parent ID Number. (Order)
            //  P is the Hierarchical Level Code. “P” indicates “Pack”.
            hlLoop3.HL = new HL();
            hlLoop3.HL.HierarchicalIDNumber_01       = "3";
            hlLoop3.HL.HierarchicalParentIDNumber_02 = "2";
            hlLoop3.HL.HierarchicalLevelCode_03      = "P";

            //  Repeating MAN
            hlLoop3.MAN = new List <MAN>();

            //  GM is the Marks and Numbers Qualifier. “GM” indicates
            //  “EAN.UCC Serial Shipping Container Code(SSCC) and
            //  Application Identifier.”
            //  00000010012345614785 is the Marks and Numbers(SCC-18).
            var man1 = new MAN();

            man1.MarksandNumbersQualifier_01 = "GM";
            man1.MarksandNumbers_02          = "00000091670124582779";//ASN !!
            hlLoop3.MAN.Add(man1);

            //  End HL Loop 3
            result.HLLoop.Add(hlLoop3);

            //  Begin HL Loop 4
            var hlLoop4 = new Loop_HL_856();

            //  4 is the Hierarchical ID Number.
            //  3 is the Hierarchical Parent ID Number. (Pack)
            //  I is the Hierarchical Level Code. “I” indicates “Item”
            hlLoop4.HL = new HL();
            hlLoop4.HL.HierarchicalIDNumber_01       = "4";
            hlLoop4.HL.HierarchicalParentIDNumber_02 = "3";
            hlLoop4.HL.HierarchicalLevelCode_03      = "I";

            //  UP is the Product/Service ID Qualifier. “UP” indicates “UCC12"
            //  008815509183 is the Product / Service ID
            hlLoop4.LIN = new LIN();
            hlLoop4.LIN.ProductServiceIDQualifier_02 = "UP";
            hlLoop4.LIN.ProductServiceID_03          = "190403545724";

            //  4 is the Number of Units Shipped.
            //  EA is the Unit or Basis for Measurement Code. “EA” indicates
            //  “Each”.

            hlLoop4.SN1 = new SN1();
            hlLoop4.SN1.NumberofUnitsShipped_02          = "1";
            hlLoop4.SN1.UnitorBasisforMeasurementCode_03 = "EA";

            //  End HL Loop 4
            result.HLLoop.Add(hlLoop4);

            //  Begin HL Loop 5
            var hlLoop5 = new Loop_HL_856();

            //  5 is the Hierarchical ID Number.
            //  3 is the Hierarchical Parent ID Number. (Pack)
            //  I is the Hierarchical Level Code. “I” indicates “Item”.
            hlLoop5.HL = new HL();
            hlLoop5.HL.HierarchicalIDNumber_01       = "5";
            hlLoop5.HL.HierarchicalParentIDNumber_02 = "3";
            hlLoop5.HL.HierarchicalLevelCode_03      = "I";

            //  UP is the Product/Service ID Qualifier. “UP” indicates “UCC
            //  -12”.
            //  008815547321 is the Product / Service ID.
            hlLoop5.LIN = new LIN();
            hlLoop5.LIN.ProductServiceIDQualifier_02 = "UP";
            hlLoop5.LIN.ProductServiceID_03          = "190403893498";

            //  9 is the Number of Units Shipped.
            //  EA is the Unit or Basis for Measurement Code. “EA”
            //  indicates “Each”.

            hlLoop5.SN1 = new SN1();
            hlLoop5.SN1.NumberofUnitsShipped_02          = "1";
            hlLoop5.SN1.UnitorBasisforMeasurementCode_03 = "EA";

            //  End HL Loop 5
            result.HLLoop.Add(hlLoop5);



            //  5 is the Number of Line Items (number of HL segments in the
            //  document).
            result.CTT = new CTT();
            result.CTT.NumberofLineItems_01 = "5";

            return(result);
        }
示例#9
0
        /// <summary>
        /// Builds ship bill notice.
        /// Original from http://www.bergware.net/bisacwww/857_3060.htm
        /// </summary>
        static TS857 BuildShipBillNotice(string controlNumber)
        {
            var result = new TS857();

            //  Transaction 857
            //  Set control number 12103
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "857";
            result.ST.TransactionSetControlNumber_02  = controlNumber.PadLeft(9, '0');

            //  Hierarchical structure code 0001
            //  Original transaction set
            //  Ship date of 01 / 10 / 98
            result.BHT = new BHT();
            result.BHT.HierarchicalStructureCode_01 = "0001";
            result.BHT.TransactionSetPurposeCode_02 = "00";
            result.BHT.Date_04 = "980110";

            //  Repeating HL Loops
            result.HLLoop = new List <Loop_HL_857>();

            //  Begin HL Loop 1
            var hlLoop1 = new Loop_HL_857();

            //  Hierarchical level 1 shipment
            hlLoop1.HL = new HL();
            hlLoop1.HL.HierarchicalIDNumber_01  = "1";
            hlLoop1.HL.HierarchicalLevelCode_03 = "S";

            //  Begin G05 Loop 1
            hlLoop1.G05Loop = new Loop_G05_857();

            //  3 shipped units
            hlLoop1.G05Loop.G05 = new G05();
            hlLoop1.G05Loop.G05.NumberofUnitsShipped_01          = "3";
            hlLoop1.G05Loop.G05.UnitorBasisforMeasurementCode_02 = "UN";

            //  Repeating DTM
            hlLoop1.G05Loop.DTM = new List <DTM>();

            //  Ship date of
            //  01 / 10 / 98
            //  Century designation of 19
            var dtm1 = new DTM();

            dtm1.DateTimeQualifier_01 = "011";
            dtm1.Date_02 = "980110";
            dtm1.DateTimePeriodFormatQualifier_05 = "19";
            hlLoop1.G05Loop.DTM.Add(dtm1);

            //  Repeating N1 G05 Loops
            hlLoop1.G05Loop.N1Loop = new List <Loop_N1_857>();

            //  Begin N1 G05 Loop 1
            var n1Loop1 = new Loop_N1_857();

            //  Ship from
            //  SAN
            //  216793X
            n1Loop1.N1 = new N1();
            n1Loop1.N1.EntityIdentifierCode_01        = "SF";
            n1Loop1.N1.IdentificationCodeQualifier_03 = "15";
            n1Loop1.N1.IdentificationCode_04          = "216793X";

            //  End N1 G05 Loop 1
            hlLoop1.G05Loop.N1Loop.Add(n1Loop1);

            //  Begin N1 G05 Loop 2
            var n1Loop2 = new Loop_N1_857();

            //  Ship to
            //  SAN
            //  6678157
            n1Loop2.N1 = new N1();
            n1Loop2.N1.EntityIdentifierCode_01        = "ST";
            n1Loop2.N1.IdentificationCodeQualifier_03 = "15";
            n1Loop2.N1.IdentificationCode_04          = "6678157";

            //  End N1 G05 Loop 2
            hlLoop1.G05Loop.N1Loop.Add(n1Loop2);

            //  Begin N1 G05 Loop 3
            var n1Loop3 = new Loop_N1_857();

            //  Bill to
            //  SAN
            //  1135309
            n1Loop3.N1 = new N1();
            n1Loop3.N1.EntityIdentifierCode_01        = "BT";
            n1Loop3.N1.IdentificationCodeQualifier_03 = "15";
            n1Loop3.N1.IdentificationCode_04          = "1135309";

            //  End N1 G05 Loop 3
            hlLoop1.G05Loop.N1Loop.Add(n1Loop3);

            //  Begin N1 G05 Loop 4
            var n1Loop4 = new Loop_N1_857();

            //  Vendor
            //  SAN
            //  2002450
            n1Loop4.N1 = new N1();
            n1Loop4.N1.EntityIdentifierCode_01        = "VN";
            n1Loop4.N1.IdentificationCodeQualifier_03 = "15";
            n1Loop4.N1.IdentificationCode_04          = "2002450";

            //  End N1 G05 Loop 4
            hlLoop1.G05Loop.N1Loop.Add(n1Loop4);

            //  End G05 Loop 1

            //  End HL Loop 1
            result.HLLoop.Add(hlLoop1);

            //  Begin HL Loop 2
            var hlLoop2 = new Loop_HL_857();

            //  Hierarchical level 2 order
            hlLoop2.HL = new HL();
            hlLoop2.HL.HierarchicalIDNumber_01  = "2";
            hlLoop2.HL.HierarchicalLevelCode_03 = "O";

            //  Begin TDS Loop
            hlLoop2.TDSLoop = new Loop_TDS_857();

            //  Total invoice before discount
            //  is applied is $3,837.50
            //  Amount subject to Terms
            //  discount is $3,837.50
            //  Discounted amount due
            //  is $2,187.36
            hlLoop2.TDSLoop.TDS           = new TDS();
            hlLoop2.TDSLoop.TDS.Amount_01 = "383750";
            hlLoop2.TDSLoop.TDS.Amount_02 = "383750";
            hlLoop2.TDSLoop.TDS.Amount_03 = "218736";

            //  Purchase order number
            //  012323456789123
            //  Purchase order date
            //  of 01 / 06 / 98
            hlLoop2.TDSLoop.PRF = new PRF();
            hlLoop2.TDSLoop.PRF.PurchaseOrderNumber_01       = "0123456789123";
            hlLoop2.TDSLoop.PRF.ChangeOrderSequenceNumber_03 = "980106";

            //  End TDS Loop

            //  End HL Loop 2
            result.HLLoop.Add(hlLoop2);

            //  Begin HL Loop 3
            var hlLoop3 = new Loop_HL_857();

            //  Hierarchical level 3 pack
            hlLoop3.HL = new HL();
            hlLoop3.HL.HierarchicalIDNumber_01  = "3";
            hlLoop3.HL.HierarchicalLevelCode_03 = "P";

            //  Begin LX Loop
            hlLoop3.LXLoop = new Loop_LX_857();

            //  Loop start. Mandatory segment
            hlLoop3.LXLoop.LX = new LX();
            hlLoop3.LXLoop.LX.AssignedNumber_01 = "1";

            //  Repeating MAN
            hlLoop3.LXLoop.MAN = new List <MAN>();

            //  UCC/EAN-128 Serial shipping
            //  container code format.
            //  Marks and numbers used to
            //  identify the carton
            //  00097800006400000012
            var man1 = new MAN();

            man1.MarksandNumbersQualifier_01 = "GM";
            man1.MarksandNumbers_02          = "00097800006400000012";
            hlLoop3.LXLoop.MAN.Add(man1);

            //  End LX Loop

            //  End HL Loop 3
            result.HLLoop.Add(hlLoop3);

            //  Begin HL Loop 4
            var hlLoop4 = new Loop_HL_857();

            //  Hierarchical level 4 item
            hlLoop4.HL = new HL();
            hlLoop4.HL.HierarchicalIDNumber_01  = "4";
            hlLoop4.HL.HierarchicalLevelCode_03 = "I";

            //  Begin IT1 Loop
            hlLoop4.IT1Loop = new Loop_IT1_857();

            //  Line item 1
            //  Shipped 2
            //  units
            //  at $8.40
            //  for each unit
            //  ISBN
            //  0835201031
            hlLoop4.IT1Loop.IT1 = new IT1();
            hlLoop4.IT1Loop.IT1.AssignedIdentification_01        = "1";
            hlLoop4.IT1Loop.IT1.QuantityInvoiced_02              = "2";
            hlLoop4.IT1Loop.IT1.UnitorBasisforMeasurementCode_03 = "UN";
            hlLoop4.IT1Loop.IT1.UnitPrice_04                 = "8.4";
            hlLoop4.IT1Loop.IT1.BasisofUnitPriceCode_05      = "PE";
            hlLoop4.IT1Loop.IT1.ProductServiceIDQualifier_06 = "IB";
            hlLoop4.IT1Loop.IT1.ProductServiceID_07          = "0835201031";

            //  Repeating CTP
            hlLoop4.IT1Loop.CTP = new List <CTP>();

            //  Suggested list price of
            //  $10.50
            //  Discount
            //  multiplier of .8
            //  (100 % -80 % = 20 % discount)
            var ctp1 = new CTP();

            ctp1.PriceIdentifierCode_02      = "SLP";
            ctp1.UnitPrice_03                = "10.5";
            ctp1.PriceMultiplierQualifier_06 = "DIS";
            ctp1.Multiplier_07               = ".8";
            hlLoop4.IT1Loop.CTP.Add(ctp1);

            //  End IT1 Loop

            //  End HL Loop 4
            result.HLLoop.Add(hlLoop4);

            //  Begin HL Loop 5
            var hlLoop5 = new Loop_HL_857();

            //  Hierarchical level 5 item
            hlLoop5.HL = new HL();
            hlLoop5.HL.HierarchicalIDNumber_01  = "5";
            hlLoop5.HL.HierarchicalLevelCode_03 = "I";

            //  Begin IT1 Loop
            hlLoop5.IT1Loop = new Loop_IT1_857();

            //  Line item 2
            //  Shipped 1
            //  unit
            //  at $24.00
            //  per each unit
            //  ISBN
            //  0835208338
            hlLoop5.IT1Loop.IT1 = new IT1();
            hlLoop5.IT1Loop.IT1.AssignedIdentification_01        = "2";
            hlLoop5.IT1Loop.IT1.QuantityInvoiced_02              = "1";
            hlLoop5.IT1Loop.IT1.UnitorBasisforMeasurementCode_03 = "UN";
            hlLoop5.IT1Loop.IT1.UnitPrice_04                 = "24";
            hlLoop5.IT1Loop.IT1.BasisofUnitPriceCode_05      = "PE";
            hlLoop5.IT1Loop.IT1.ProductServiceIDQualifier_06 = "IB";
            hlLoop5.IT1Loop.IT1.ProductServiceID_07          = "0835208338";

            //  Repeating CTP
            hlLoop5.IT1Loop.CTP = new List <CTP>();

            //  Suggested list price of
            //  $30.00
            //  Discount
            //  multiplier of .8
            //  (100 % -80 % = 20 % discount)
            var ctp2 = new CTP();

            ctp2.PriceIdentifierCode_02      = "SLP";
            ctp2.UnitPrice_03                = "30";
            ctp2.PriceMultiplierQualifier_06 = "DIS";
            ctp2.Multiplier_07               = ".8";
            hlLoop5.IT1Loop.CTP.Add(ctp2);

            //  End IT1 Loop

            //  End HL Loop 5
            result.HLLoop.Add(hlLoop5);

            return(result);
        }
        //---------------------------------------------------------------------------
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //
            Button selbtn  = sender as Button;
            int    nSelTag = Convert.ToInt32(selbtn.Tag);
            int    nTag    = 0;

            switch (nSelTag)
            {
            case 0:
                SUPPLY[0]._bSlurryReq = !SUPPLY[0]._bSlurryReq;
                //if (SUPPLY[0]._bSlurryReq)
                //{
                //    SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.Silica01);
                //}
                //else
                //{
                //    SEQ_POLIS.fn_StopAllUtil();
                //}
                break;

            case 1:
                SUPPLY[0]._bCleanReq = !SUPPLY[0]._bCleanReq;
                //if (SUPPLY[0]._bCleanReq)
                //{
                //    SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.Silica01);  //SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.DIWater);
                //}
                //else
                //{
                //    SEQ_POLIS.fn_StopAllUtil();
                //}
                break;

            case 2:
                nTag = (int)EN_MAN_LIST.MAN_0421;
                MAN.fn_ManProcOn(nTag, true, false);
                break;

            //case 3:
            //    SUPPLY[1]._bSlurryReq = !SUPPLY[1]._bSlurryReq;
            //    break;
            //case 4:
            //    SUPPLY[1]._bCleanReq = !SUPPLY[1]._bCleanReq;
            //    break;
            //case 5:
            //    SUPPLY[1]._bDrainvValve = !SUPPLY[1]._bDrainvValve;
            //    break;
            case 10:
                SUPPLY[1]._bSlurryReq = !SUPPLY[1]._bSlurryReq;
                //if (SUPPLY[1]._bSlurryReq)
                //{
                //    SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.Soap);
                //}
                //else
                //{
                //    SEQ_POLIS.fn_StopAllUtil();
                //}
                break;

            case 11:
                SUPPLY[1]._bCleanReq = !SUPPLY[1]._bCleanReq;
                //if (SUPPLY[0]._bCleanReq)
                //{
                //    SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.DIWater);
                //}
                //else
                //{
                //    SEQ_POLIS.fn_StopAllUtil();
                //}
                break;

            default:
                break;
            }
        }
示例#11
0
 private void String_Save(string filename, MAN selectedMAN)
 {
     StreamWriter writer = null;
     try
     {
         writer = new StreamWriter(new FileStream(filename, FileMode.Create));
         mMAN.StringWrite(writer);
     }
     catch (IOException exc)
     {
         MessageBox.Show(exc.Message);
     }
     finally
     {
         if (writer != null)
             writer.Close();
     }
 }
示例#12
0
        private void String_Read(string filename, MAN selectedMAN)
        {
            StreamReader reader = null;
            try
            {
                reader = new StreamReader(new FileStream(filename, FileMode.Open));
                mMAN.StringRead(reader);
            }
            catch (IOException exc)
            {
                MessageBox.Show(exc.Message);
            }
            finally
            {
                if (reader != null)
                    reader.Close();
            }

            listbox0.ItemsSource = mMAN;
        }
示例#13
0
        private void Serialize(string filename, MAN selectedMAN)
        {
            Bar bubu = new Bar();
            Foo fufu = new Foo() { bar = bubu };
            bubu.foo = fufu;

            Serializer sl = new Serializer(filename, true);
            sl.WriteObject(selectedMAN);
            sl.Close();
        }
示例#14
0
        private void Deserialize(string filename, MAN selectedMAN)
        {
            mMAN.Clear();

            Serializer dsl = new Serializer(filename, false);
            mMAN = (MAN)dsl.ReadObject();
            dsl.Close();

            listbox0.ItemsSource = mMAN;
            listbox1.ItemsSource = null;
        }
 //---------------------------------------------------------------------------
 private void btEnd_Click(object sender, RoutedEventArgs e)
 {
     MAN.fn_SetRptAct(-1, false, 0);
 }