protected void SetDateRange(string strStartDate, string strStartTime, string strEndDate, string strEndTime) { this.startDate = Convert.ToDateTime(String.Format("{0:d} {1:t}", strStartDate, strStartTime), PosConfiguration.GetDefCulture()); this.endDate = Convert.ToDateTime(String.Format("{0:d} {1:t}", strEndDate, strEndTime), PosConfiguration.GetDefCulture()); if (startDate > DateTime.Now || endDate < DateTime.Now) { throw new ParameterRelationException("Promotion date range is not valid"); } }