Esempio n. 1
0
        ///	<summary>
        ///	Data Set Get Trailer Data
        ///	</summary>
        private DataSet GetTrailerData()
        {
            DataSet dsTrailers = null;

            if (Request.QueryString["showAvailable"] != null)
            {
                DateTime startDate = DateTime.Parse(dteStartDate.SelectedDate.ToString());
                startDate = startDate.Subtract(startDate.TimeOfDay);

                DateTime endDate = DateTime.Parse(dteEndDate.SelectedDate.ToString());
                endDate = endDate.Subtract(endDate.TimeOfDay).Add(new TimeSpan(23, 59, 59));

                Facade.IResource facTrailer = new Facade.Resource();
                dsTrailers = facTrailer.GetAvailableForDateRange(eResourceType.Trailer, startDate, endDate);

                pnlTrailer.Visible = true;
            }
            else if (!String.IsNullOrEmpty(txtFilterTrailerRef.Text))
            {
                Facade.ITrailer facResource = new Facade.Resource();
                dsTrailers         = facResource.GetFiltered(false, txtFilterTrailerRef.Text);
                pnlTrailer.Visible = true;
            }
            else
            {
                Facade.ITrailer facResource = new Facade.Resource();
                dsTrailers         = facResource.GetAll(false, false);
                pnlTrailer.Visible = true;
            }

            return(dsTrailers);
        }