Ejemplo n.º 1
0
        public bool SendNomination(List <string> transactionIDs)
        {
            bool sendToTest = Convert.ToBoolean(ConfigurationManager.AppSettings["SendToTest"]);
            bool results    = false;

            ShipperReturnByIdentity currentIdentity = GetValueFromIdentity();
            int companyId = String.IsNullOrEmpty(currentIdentity.CompanyId) ? 0 : int.Parse(currentIdentity.CompanyId);

            List <bool> tempBool = new List <bool>();
            int         statusId = 0;

            foreach (var transactionID in transactionIDs)
            {
                statusId = pathedNominationService.GetStatusOnTransactionId(new Guid(transactionID));
                if (statusId == 11)
                {
                    var result = IPNTNominationService.SendNominationTransaction(new Guid(transactionID), companyId, sendToTest);
                    tempBool.Add(result);
                }
                else
                {
                    tempBool.Add(false);
                }
            }
            if ((tempBool.Where(a => a == false).Count()) == 0)
            {
                results = true;
            }
            return(results);
        }