public DateRangeParameterSet GetWeek() { DateRangeParameterSet s = new DateRangeParameterSet(); return(s); }
public DateRangeParameterSet GetAsRange() { DateRangeParameterSet set = new DateRangeParameterSet(); if (date.SelectedDate != DateTime.MinValue) { set.DateFrom = date.SelectedDate; set.DateTo = date.SelectedDate; } else { set.DateFrom = DateTime.Now; set.DateTo = DateTime.Now; } return(set); }
public DateRangeParameterSet GetRange() { DateRangeParameterSet set = new DateRangeParameterSet(); if (datefield1.SelectedDate != DateTime.MinValue) { set.DateFrom = datefield1.SelectedDate; set.DateTo = datefield1.SelectedDate.AddMonths(1).AddDays(-1); } else { int year, month; year = DateTime.Now.Year; month = DateTime.Now.Month; set.DateFrom = new DateTime(year, month, 1); set.DateTo = new DateTime(year, month, DateTime.DaysInMonth(year, month)); } return(set); }
public DateRangeParameterSet GetRange() { DateRangeParameterSet set = new DateRangeParameterSet(); set.IsDayId = IsDayIdFormat; if (dateFrom.SelectedDate != DateTime.MinValue) { set.DateFrom = dateFrom.SelectedDate; } else { set.DateFrom = DateTime.Now; } if (dateTo.SelectedDate != DateTime.MinValue) { set.DateTo = dateTo.SelectedDate; } else { set.DateTo = DateTime.Now; } return(set); }
protected void Unnamed_Event(object sender, DirectEventArgs e) { ReportCompositeRequest request = GetRequest(); if (string.IsNullOrEmpty(e.ExtraParams["week"])) { return; } string week = e.ExtraParams["week"]; int year = Convert.ToInt32(week.Split('-')[0]); int weekNo = Convert.ToInt32(week.Split('-')[1]); DateTime d = FirstDateOfWeekISO8601(year, weekNo); DateTime dF = d.AddDays(6); DateRangeParameterSet r = new DateRangeParameterSet(); r.DateFrom = d; r.DateTo = dF; r.IsDayId = true; request.Add(r); ListResponse <Model.Reports.RT304> resp = _reportsService.ChildGetAll <Model.Reports.RT304>(request); if (!resp.Success) { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(resp); return; } if (resp.Items.Count > 0) { DisplayResult(resp.Items); } else { firstStore.DataSource = new List <departmentAvailability>(); firstStore.DataBind(); } }