Beispiel #1
0
        protected override void _cm_DoCMReceiveData(object sender, CMRecvDataEventArgs e)
        {
            if (e.DataPacket is ResCustomReportOrgDataPacket)
            {
                if (ReceiveCustomReportData != null)
                {
                    ReceiveCustomReportData(((ResCustomReportOrgDataPacket)e.DataPacket).ChangedFields);
                }

                if (ReceiveCustomReportDataEmCode != null)
                {
                    Dictionary <String, List <FieldIndex> > ChangedFields =
                        new Dictionary <String, List <FieldIndex> >(
                            ((ResCustomReportOrgDataPacket)e.DataPacket).ChangedFields.Count);
                    foreach (
                        KeyValuePair <int, List <FieldIndex> > onePair in
                        ((ResCustomReportOrgDataPacket)e.DataPacket).ChangedFields)
                    {
                        Dictionary <FieldIndex, object> memData;
                        ChangedFields[Dc.GetFieldDataString(onePair.Key, FieldIndex.EMCode)] = onePair.Value;
                    }
                    ReceiveCustomReportDataEmCode(ChangedFields);
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// _cm_DoCMReceiveData
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected override void _cm_DoCMReceiveData(object sender, CMRecvDataEventArgs e)
 {
     if (e.DataPacket is ResShortLineStragedytDataPacket)
     {
         if (null != OnTransactionReceived)
         {
             List <OneShortLineDataRec> temp = Dc.GetShortLineData(Dc.UserShortLineTypes);
             if (temp.Count == 0 || null == Dc.GetFieldDataString(temp[temp.Count - 1].Code, FieldIndex.Name))
             {
                 return;
             }
             TransactionDataArgs args = new TransactionDataArgs(temp[temp.Count - 1].Code,
                                                                Dc.GetFieldDataString(temp[temp.Count - 1].Code, FieldIndex.Name),
                                                                EnumUtility.GetShortLineTypeString(temp[temp.Count - 1].SlType));
             OnTransactionReceived(args);
         }
     }
 }