Exemplo n.º 1
0
        private void retrieveNotifications()
        {
            var pomList = m_cardnetDAL.getCardnetDB().C___NOTIFICATION.OrderByDescending(o => o.INSERTED).ToList();

            foreach (var item in pomList)
            {
                Notification notif = new Notification();
                try
                {
                    notif.AppId              = item.APP_ID;
                    notif.ID                 = item.ID;
                    notif.Inserted           = item.INSERTED;
                    notif.LastUpdated        = item.LASTUPDATED;
                    notif.NotificationTypeId = item.NOTIFICATION_TYPE_ID;
                    notif.Status             = item.STATUS;
                    notif.Subject            = item.SUBJECT;
                    notif.Message            = item.MESSAGE;

                    m_notifs.Add(notif);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Interface method
        /// </summary>
        public void retrieveRequests()
        {
            // retrieve card order requests from db into @m_req002
            var pomList = m_cardnetDAL.getCardnetDB().C____REQ008.OrderByDescending(o => o.CREATION_DATETIME).ToList();

            m_req008 = new List <CardTransferRequest>();

            foreach (var item in pomList)
            {
                CardTransferRequest ctr = new CardTransferRequest();
                try
                {
                    ctr.BalanceTransfer       = item.BALANCE_TRANSFER == true ? "YES" : "NO";
                    ctr.BonusTransfer         = item.BONUS_TRANSFER == true ? "YES" : "NO";
                    ctr.CardnoFrom            = item.CARDNO_FROM;
                    ctr.CardnoFromFinalStatus = m_cardnetDAL.getConstantUniversals().Where(c => c.ConstantName == "cardno_from_final_status" && c.ConstantValue == item.CARDNO_FROM_FINAL_STATUS).Select(c => c.ConstantDescription).FirstOrDefault();
                    ctr.CardnoTo         = item.CARDNO_TO;
                    ctr.Content          = item.CONTENT;
                    ctr.CreationDateTime = item.CREATION_DATETIME;
                    ctr.ID               = item.ID;
                    ctr.IsProcessing     = item.IS_PROCESSING;
                    ctr.LastUpdateDate   = item.LAST_UPDATE;
                    ctr.PartnerId        = item.PARTNER_ID;
                    ctr.PartnerName      = m_cardnetDAL.getPartners().Where(p => p.ID == item.PARTNER_ID).Select(p => p.OrganizationName).First();
                    ctr.PartnerRequestId = item.PARTNER_REQUEST_ID;
                    ctr.RequestId        = item.REQUEST_ID;

                    var pomRequestStatus = "";
                    if (item.REQUEST_STATUS == 1)
                    {
                        pomRequestStatus = "SUCCEEDED";
                    }
                    else if (item.REQUEST_STATUS == 0)
                    {
                        pomRequestStatus = "DECLINED";
                    }
                    else
                    {
                        pomRequestStatus = "null"; // nemalo by sa stat nikdy
                    }
                    ctr.RequestStatus          = pomRequestStatus;
                    ctr.SlaDeadline            = item.SLA_DEADLINE;
                    ctr.Succesfull             = item.SUCCESSFULL;
                    ctr.TransferCase           = m_cardnetDAL.getConstantUniversals().Where(c => c.ConstantName == "transfer_case" && c.ConstantValue == item.TRANSFER_CASE).Select(c => c.ConstantDescription).First();
                    ctr.TransferType           = m_cardnetDAL.getConstantUniversals().Where(c => c.ConstantName == "transfer_type" && c.ConstantValue == item.TRANSFER_TYPE).Select(c => c.AdditionalValue).First();
                    ctr.AccountTypeId          = item.ACCOUNT_TYPE_ID;
                    ctr.AccountTypefinalStatus = item.ACCOUNT_TYPE_FINAL_STATUS;

                    var pom = m_cardnetDAL.getConstantPartner().Where(p => p.PartnerName == ctr.PartnerName && p.ConstantName == "AccountTypeId" && p.ConstantValue.Substring(12) == item.ACCOUNT_TYPE_ID.ToString()).Select(p => p.ConstantDescription).FirstOrDefault();
                    ctr.AccountTypeIdName = pom == null ? "ERROR" : pom;

                    m_req008.Add(ctr);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Interface method
        /// </summary>
        public void retrieveRequests()
        {
            // retrieve card order requests from db into @m_req002
            var pomList = m_cardnetDAL.getCardnetDB().C____REQ004.OrderByDescending(o => o.creation_datetime).ToList();

            m_req004 = new List <CardStatusUpdateRequest>();

            foreach (var item in pomList)
            {
                CardStatusUpdateRequest csur = new CardStatusUpdateRequest();
                try
                {
                    csur.AnswerDateTime   = item.answer_datetime;
                    csur.CreationDateTime = item.creation_datetime;
                    csur.DailyLimit       = item.daily_limit;
                    csur.ExternalCardId   = item.external_card_id;
                    csur.ID               = item.id;
                    csur.PartnerName      = m_cardnetDAL.getPartners().Where(p => p.ID == item.partner_id).Select(p => p.OrganizationName).First() /* item.partner_id*/;
                    csur.PartnerRequestId = item.partner_request_id;
                    csur.RequestId        = item.request_id;

                    var pomRequestStatus = "";
                    if (item.request_status == true)
                    {
                        pomRequestStatus = "SUCCEEDED";
                    }
                    else if (item.request_status == false)
                    {
                        pomRequestStatus = "DECLINED";
                    }
                    else
                    {
                        pomRequestStatus = "null"; // nemalo by sa stat nikdy
                    }
                    csur.RequestStatus    = pomRequestStatus;
                    csur.TransactionLimit = item.transaction_limit;

                    csur.RequestedStateId = getRequestedStateIDDescription(csur.PartnerName, item.requested_state_id);
                    csur.AccountTypeId    = item.ACCOUNT_TYPE_ID;

                    var pom = m_cardnetDAL.getConstantPartner().Where(p => p.PartnerName == csur.PartnerName && p.ConstantName == "AccountTypeId" && p.ConstantValue.Substring(12) == item.ACCOUNT_TYPE_ID.ToString()).Select(p => p.ConstantDescription).FirstOrDefault();
                    csur.AccountTypeIdName = pom == null ? "ERROR" : pom;

                    m_req004.Add(csur);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
        }
Exemplo n.º 4
0
        // interface method
        public void retrieveRequests()
        {
            // retrieve card order requests from db into @m_req002
            var pomList = m_cardnetDAL.getCardnetDB().C____REQ001.OrderByDescending(o => o.creation_datetime).ToList();

            m_req001 = new List <PosAcceptanceRequest>();

            foreach (var item in pomList)
            {
                PosAcceptanceRequest posrVM = new PosAcceptanceRequest();
                try
                {
                    posrVM.AnswerDateTime     = item.answer_datetime;
                    posrVM.CreationDateTime   = item.creation_datetime;
                    posrVM.ExternalTerminalId = item.external_terminal_id;
                    posrVM.ID               = item.id;
                    posrVM.NewAcceptState   = item.new_accept_state == true ? "ACTIVE" : "PASSIVE";
                    posrVM.PartnerName      = m_cardnetDAL.getPartners().Where(p => p.ID == item.partner_id).Select(p => p.OrganizationName).First() /* item.partner_id*/;
                    posrVM.PartnerRequestId = item.partner_request_id;
                    posrVM.RequestId        = item.request_id;

                    var pomRequestStatus = "";
                    if (item.request_status == true)
                    {
                        pomRequestStatus = "SUCCEEDED";
                    }
                    else if (item.request_status == false)
                    {
                        pomRequestStatus = "DECLINED";
                    }
                    else
                    {
                        pomRequestStatus = "null"; // nemalo by sa stat nikdy
                    }
                    posrVM.RequestStatus  = pomRequestStatus;
                    posrVM.TerminalTypeId = item.terminal_type_id;
                    posrVM.AccountTypeId  = item.ACCOUNT_TYPE_ID;

                    var pom = m_cardnetDAL.getConstantPartner().Where(p => p.PartnerName == posrVM.PartnerName && p.ConstantName == "AccountTypeId" && p.ConstantValue.Substring(12) == item.ACCOUNT_TYPE_ID.ToString()).Select(p => p.ConstantDescription).FirstOrDefault();
                    posrVM.AccountTypeIdNAME = pom == null ? "ERROR" : pom;

                    m_req001.Add(posrVM);
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
        }
Exemplo n.º 5
0
        // interface method
        public void retrieveRequests()
        {
            // retrieve card order requests from db into @m_req002
            var pomList = m_cardnetDAL.getCardnetDB().C____REQ003.OrderByDescending(o => o.creation_datetime).ToList();

            m_req003 = new List <CreditOrderRequest>();

            foreach (var item in pomList)
            {
                CreditOrderRequest cror = new CreditOrderRequest();

                cror.AnswerDateTime   = item.answer_datetime;
                cror.CreationDateTime = item.creation_datetime;
                cror.ExternalCardId   = item.external_card_id;
                cror.ID               = item.id;
                cror.PartnerName      = m_cardnetDAL.getPartners().Where(p => p.ID == item.partner_id).Select(p => p.OrganizationName).First() /* item.partner_id*/;
                cror.PartnerRequestId = item.partner_request_id;

                var pomRequestStatus = "";
                if (item.request_status == true)
                {
                    pomRequestStatus = "SUCCEEDED";
                }
                else if (item.request_status == false)
                {
                    pomRequestStatus = "DECLINED";
                }
                else
                {
                    pomRequestStatus = "null"; // nemalo by sa stat nikdy
                }
                cror.RequestStatus     = pomRequestStatus;
                cror.TransactionAmount = item.transaction_amount;
                cror.TransactionType   = m_cardnetDAL.getConstantUniversals().Where(cst => cst.ConstantName == "transaction_type" && cst.ConstantValue == item.transaction_type).Select(cst => cst.ConstantDescription).First();
                cror.RequestId         = item.request_id;
                cror.AccountTypeId     = item.ACCOUNT_TYPE_ID;

                var pom = m_cardnetDAL.getConstantPartner().Where(p => p.PartnerName == cror.PartnerName && p.ConstantName == "AccountTypeId" && p.ConstantValue.Substring(12) == item.ACCOUNT_TYPE_ID.ToString()).Select(p => p.ConstantDescription).FirstOrDefault();
                cror.AccountTypeIdName = pom == null ? "ERROR" : pom;

                m_req003.Add(cror);
            }
        }