示例#1
0
        public ActionResult LoadBusinessDate(string StoreID)
        {
            var lstData = _BusinessDayFactory.GetDataForStoreOnApi(StoreID);

            if (lstData != null && lstData.Any())
            {
                lstData = lstData.Where(ww => ww.StartedOn != Commons.MinDate).ToList();
                var lst           = lstData.Select(ss => ss.ID).ToList();
                var lstBusinessId = _factory.CheckShowBusiness(StoreID, lst);

                lstData = lstData.Where(ww => lstBusinessId.Contains(ww.ID)).ToList();
            }

            return(Json(lstData, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        public ActionResult LoadBusinessDate(string StoreID)
        {
            var lstData = _BusinessDayFactory.GetDataForStoreOnApi(StoreID);

            if (lstData != null && lstData.Any())
            {
                lstData = lstData.Where(ww => ww.StartedOn != Commons.MinDate).ToList();
                var firstBusinessDay = lstData.FirstOrDefault();
                if (firstBusinessDay != null && firstBusinessDay.ClosedOn.HasValue &&
                    firstBusinessDay.ClosedOn.Value != Commons.MinDate && lstData.Count == 2)
                {
                    lstData.RemoveAt(1);
                }

                var lst           = lstData.Select(ss => ss.ID).ToList();
                var lstBusinessId = _factory.CheckShowBusiness(StoreID, lst);

                lstData = lstData.Where(ww => lstBusinessId.Contains(ww.ID)).ToList();
            }

            return(Json(lstData, JsonRequestBehavior.AllowGet));
        }