Exemple #1
0
        /// <summary>
        /// Method Name     : GetMoveList
        /// Author          : Pratik Soni
        /// Creation Date   : 01 Mar 2018
        /// Purpose         : Gets list of move list for packed, loaded and booked
        /// Revision        :
        /// </summary>
        ///
        private List <MoveModel> GetMoveList()
        {
            List <MoveModel> moveModelList;

            moveModelList = genericMethods.GetMoveModelList(resourceManager.GetString("statusReason_booked"));
            moveModelList.AddRange(genericMethods.GetMoveModelList(resourceManager.GetString("statusReason_packed")));
            moveModelList.AddRange(genericMethods.GetMoveModelList(resourceManager.GetString("statusReason_loaded")));
            return(moveModelList);
        }
Exemple #2
0
        /// <summary>
        /// Method Name     : SendAlerts
        /// Author          : Pratik Soni
        /// Creation Date   : 15 Feb 2018
        /// Purpose         : To create alerts for each move
        /// Revision        :
        /// </summary>
        public void SendAlerts()
        {
            List <MoveModel> failedMoveModelList;
            List <MoveModel> moveModelList;

            try
            {
                moveModelList = genericMethods.GetMoveModelList(resourceManager.GetString("statusReason_ordered"));

                if (moveModelList.Count == 0)
                {
                    logger.Info(resourceManager.GetString("logNoMovesForOrdered"));
                    return;
                }

                failedMoveModelList = new List <MoveModel>();

                AlertGenerationForAllOrderedMoves(ref failedMoveModelList, moveModelList);

                //Writes list of failed DTOs to the XML file.
                if (!General.WriteDTOListToXMLFile <List <MoveModel> >(failedMoveModelList, resourceManager.GetString("fileName_OrderedMoveModelList")))
                {
                    logger.Error("logErrorOccuredINFileWriting");
                }

                //Increment the count key
                General.UpdateConfigValueForCount();
            }
            catch (Exception ex)
            {
                logger.Error("Error occured: ", ex);
            }
        }