Example #1
0
        private string getDeliveryDays(EnterpriseDS.StoreTableRow store)
        {
            //Return delivery days from the dataset
            string ddays = "";

            //Check for overrides
            if (!store.IsIsDeliveryDayMondayNull())
            {
                ddays += (store.IsDeliveryDayMonday.Trim() == "Y" ? "M" : "");
            }
            if (!store.IsIsDeliveryDayTuesdayNull())
            {
                ddays += (store.IsDeliveryDayTuesday.Trim() == "Y" ? "T" : "");
            }
            if (!store.IsIsDeliveryDayWednesdayNull())
            {
                ddays += (store.IsDeliveryDayWednesday.Trim() == "Y" ? "W" : "");
            }
            if (!store.IsIsDeliveryDayThursdayNull())
            {
                ddays += (store.IsDeliveryDayThursday.Trim() == "Y" ? "R" : "");
            }
            if (!store.IsIsDeliveryDayFridayNull())
            {
                ddays += (store.IsDeliveryDayFriday.Trim() == "Y" ? "F" : "");
            }

            //If no overrides, then all days are valid
            if (ddays.Trim().Length == 0)
            {
                ddays = "MTWRF";
            }
            return(ddays);
        }