Esempio n. 1
0
        public SecurityTaskDomain BuildStartTask()
        {
            SecurityTaskDomain tempTask = new SecurityTaskDomain();

            tempTask.SecurityCode   = securityCode;
            tempTask.ExchangeMarket = exchangeMarket;
            tempTask.BeginDate      = listingDate;
            tempTask.EndDate        = listingDate.AddYears(1);
            if (tempTask.EndDate.Date >= DateTime.Now.Date)
            {
                tempTask.EndDate = DateTime.Now.AddDays(-1).Date;
            }
            if (tempTask.BeginDate > tempTask.EndDate)
            {
                tempTask.EndDate = tempTask.BeginDate;
            }
            return(tempTask);
        }
Esempio n. 2
0
        public SecurityTaskDomain BuildNextTask()
        {
            SecurityTaskDomain tempTask = new SecurityTaskDomain();

            tempTask.SecurityCode   = securityCode;
            tempTask.ExchangeMarket = exchangeMarket;
            tempTask.BeginDate      = endDate.AddDays(1);
            tempTask.EndDate        = tempTask.BeginDate.AddYears(1);
            if (tempTask.EndDate >= DateTime.Now.Date)
            {
                tempTask.EndDate = DateTime.Now.AddDays(-1).Date;
            }
            if (tempTask.BeginDate > tempTask.EndDate)
            {
                tempTask.EndDate = tempTask.BeginDate;
            }
            tempTask.IsFinished = false;
            return(tempTask);
        }