Beispiel #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     dataManager = new DSManager("","","",10,"", "");
     SummaryData summaryDataTemplate = new SummaryData();
     summaryDataTemplate.FinalApprovalFlag = "N";
     IList<SummaryData> summaryList = dataManager.DaoManager.CreateObjList<SummaryData>(summaryDataTemplate);
 }
        public void InitForm()
        {
            try
            {
                dataManager = new DSManager(jmsServer, jmsUser, jmsPassword, cacheUpdateTimerInterval, msgFilter, msgFilter);
                dataManager.IncMessageCounter += new EventHandler(OnIncMessageCounter);

                dataSet = new DataSet();

                SummaryData summaryDataTemplate = new SummaryData();
                IList<SummaryData> summaryList;
                summaryList = dataManager.DaoManager.CreateObjList<SummaryData>(summaryDataTemplate);
                string filterText = "";  //G
                summaryDataTable = CollectionHelper.ConvertTo<SummaryData>(summaryList, filterText);
                summaryDataTable.PrimaryKey = new DataColumn[] { summaryDataTable.Columns["Id"] };

                dataSet.Tables.Add(summaryDataTable);

                dataManager.RegisterDataSet(ref dataSet);
                dataManager.RegisterGridControl(ref gridMain);
                dataManager.StartListening();

                gridMain.DataSource = dataSet.Tables["SummaryData"];
                gridMain.ForceInitialize();

            }
            catch (Exception error)
            {
                MessageBox.Show("Error:" + error.Message);
            }
        }
Beispiel #3
0
        private void CopyDataToBeUpdated()
        {
            sumDataCacheCopy.Clear();
            rqmtDataCacheCopy.Clear();
            assDocDataCacheCopy.Clear();
            inbDocViewCacheCopy.Clear();
            tradeRqmtConfirmCacheCopy.Clear();
            
            foreach (SummaryData data in sumDataCache)
            {
                SummaryData copyData = new SummaryData();
                copyData = data;
                sumDataCacheCopy.Add(copyData);
            }

            foreach (RqmtData data in rqmtDataCache)
            {
                RqmtData copyData = new RqmtData();
                copyData = data;
                rqmtDataCacheCopy.Add(copyData);
            }

            foreach (AssociatedDoc data in assDocDataCache)
            {
                AssociatedDoc copyData = new AssociatedDoc();
                copyData = data;
                assDocDataCacheCopy.Add(copyData);
            }

            foreach (InboundDocsView data in inbDocViewCache)
            {
                InboundDocsView copyData = new InboundDocsView();
                copyData = data;
                inbDocViewCacheCopy.Add(copyData);
            }

            foreach (TradeRqmtConfirm data in tradeRqmtConfirmCache)
            {
                TradeRqmtConfirm copyData = new TradeRqmtConfirm();
                copyData = data;
                tradeRqmtConfirmCacheCopy.Add(copyData);
            }
        }
Beispiel #4
0
        private TransmitDestination GetCptyFaxNo(SummaryData sumData)
        {
            if (GetCptyFaxNoDelegate == null)
            {
                return new TransmitDestination(TransmitDestinationType.EMAIL, "");
            }

            if (sumData != null)
            {
                return GetCptyFaxNoDelegate.Invoke(sumData.CptySn, sumData.CdtyCode, sumData.SttlType);
            }
                
            return new TransmitDestination(TransmitDestinationType.EMAIL, "");
        }
        public void TransmitDocument(SummaryData sumData, AssociatedDoc assDoc)
        {            
            string pageList = null;
            string fileName = null;            

            try
            {
                if (assDoc == null)
                {
                    throw new NotSupportedException("Error CNF-523: Unable to transmit without an associated document data.");
                }

                if (sumData == null)
                {
                    throw new NotSupportedException("Error CNF-524: Unable to transmit a document without trade summary data.");
                }

                var transmitter = new DocumentTransmitter(imagesDal, vaulter, xmitRequestDal);
                transmitter.SendToGateway(assDoc, sumData);                
            }
            catch (Exception ex)
            {
                LogAndDisplayException("An error occurred while transmitting the document." + Environment.NewLine +
                       "Error CNF-525 in " + FORM_NAME + ".TransmitDocument(): ", ex);
            }            
        }
        private AssociatedDoc CreateAssociatedDoc(InboundDocsView inbDocView, RqmtData activeTradeRqmt,
            SummaryData activeSummaryData)
        {
            var assDoc = new AssociatedDoc();
            assDoc.AssociatedBy = p_UserId;
            assDoc.InboundDocsId = inbDocView.Id;
            assDoc.MultipleAssociatedDocs = false;
            assDoc.SecondValidateReqFlag = activeTradeRqmt.SecondCheckFlag ?? "N";
            assDoc.TradeId = activeTradeRqmt.TradeId;
            assDoc.TradeRqmtId = activeTradeRqmt.Id;
            assDoc.TradeId = activeTradeRqmt.TradeId;

            //Israel 12/02/2015 -- Changed rqmt code to readable display
            //assDoc.DocTypeCode = activeTradeRqmt.Rqmt;
            assDoc.DocTypeCode = activeTradeRqmt.DisplayText;

            // Trade Summary Data..
            assDoc.CptyShortName = activeSummaryData.CptySn;
            assDoc.BrokerShortName = activeSummaryData.BrokerSn;
            assDoc.CdtyGroupCode = activeSummaryData.CdtyGrpCode;
            assDoc.SetDocStatus();
            SetDocIndexValue(ref assDoc);
            assDoc.FileName = inbDocView.FileName;
            return assDoc;
        }