private void fuelReportToolStripMenuItem_Click(object sender, EventArgs e) { string id = "LoadMain"; DateSelection report = new DateSelection(id); report.Show(); }
public DateSelectionItem(DateSelection selection) { DateSelection = selection; switch (DateSelection) { case DateSelection.LastYear: Start = DateTime.Now.AddYears(-1); End = DateTime.Now; break; case DateSelection.LastMonth: Start = DateTime.Now.AddMonths(-1); End = DateTime.Now; break; case DateSelection.LastWeek: Start = DateTime.Now.AddDays(-7); End = DateTime.Now; break; case DateSelection.Last24Hours: Start = DateTime.Now.AddDays(-1); End = DateTime.Now; break; } }
private void fuelWeeklyPhysicalStockToolStripMenuItem_Click(object sender, EventArgs e) { string id = "PhycisalLoad"; DateSelection report = new DateSelection(id); report.Show(); }
private void fuelStockMovementReportToolStripMenuItem_Click(object sender, EventArgs e) { string id = "stockMovement"; DateSelection reptView = new DateSelection(id); reptView.ShowDialog(); }
public ReportItemsViewModelBase(ReportArchive model) { this.model = model; this.dateSelection = new DateSelection() { StartDate = model.History.StartDate, EndDate = model.History.EndDate }; }
private void BtnPrintReport_Click(object sender, EventArgs e) { string id = "stockMovement"; //StockMovementReportView report = new StockMovementReportView(id); //report.ShowDialog(); DateSelection reptView = new DateSelection(id); reptView.ShowDialog(); }//Views\StockMovement\FuelStkReport.rpt
private void BtnPrintReport_Click(object sender, EventArgs e) { //StockMovementReportView report = new StockMovementReportView(); //report.ShowDialog(); string id = "PhycisalLoad"; DateSelection report = new DateSelection(id);//purchasebook is a formname report.ShowDialog(); }//Views\StockMovement\PhysicalStockReport.rpt
public async Task <IActionResult> AddDateSelection([FromBody] DateSelection dateSelection) { if (dateSelection?.SelectedDates == null || !dateSelection.SelectedDates.Any()) { return(BadRequest()); } await _repository.Add(dateSelection); return(Ok()); }
GetBikesAvailability( bool makeReservation, InventoryGroup[] inventoryGroups, string selectedDate, string selectedDayPart, string name, string email, string phone, string startDate, string endDate ) { DateTime startD = GetDateFromJavaScriptDate(startDate); DateTime endD = GetDateFromJavaScriptDate(endDate); DateSelection dateSelection = null; if (selectedDate != null && selectedDayPart != null) { dateSelection = new DateSelection() { DayPart = selectedDayPart, Date = selectedDate }; } string message = null; if (makeReservation) { message = DatabaseOperations.MakeReservation(inventoryGroups, name, email, phone, dateSelection); foreach (InventoryGroup group in inventoryGroups) { group.Wanted = 0; } } BikesAvailability bikesAvailability = DatabaseOperations.GetBikesAvailability(inventoryGroups, name, email, phone, startD, endD, dateSelection); bikesAvailability.Message = message; return(bikesAvailability); }
public override string ToString() { string ret = string.Empty; if (!IsEmpty) { if (!IsConcept) { ret = DateSelection.ToString(); } else { ret = SMAH1.EnumInfoBase <DateConcept> .GetFieldDescription(Concept, 0); } } return(ret); }
private DateTime SelectWorkingDate(DateTime dateTime, DateSelection selectionType) { DateTime selectedDateTime = dateTime; switch (selectionType) { case DateSelection.AfterWeekends: if (_weekends.Contains(DateTime.Now.DayOfWeek)) { selectedDateTime = SelectWorkingDate(dateTime, DateSelection.BeforeWeekends); } else { while (_weekends.Contains(selectedDateTime.DayOfWeek)) { if (selectedDateTime >= DateTime.Now) { selectedDateTime = dateTime; } else { selectedDateTime = selectedDateTime.AddDays(1); } } } break; case DateSelection.BeforeWeekends: while (_weekends.Contains(selectedDateTime.DayOfWeek)) { selectedDateTime = selectedDateTime.AddDays(-1); } break; default: throw new ArgumentOutOfRangeException(nameof(selectionType), selectionType, null); } return(selectedDateTime); }
void ReleaseDesignerOutlets() { if (AddImage != null) { AddImage.Dispose(); AddImage = null; } if (btnCancel != null) { btnCancel.Dispose(); btnCancel = null; } if (btnDone != null) { btnDone.Dispose(); btnDone = null; } if (CameraIcon != null) { CameraIcon.Dispose(); CameraIcon = null; } if (DateSelection != null) { DateSelection.Dispose(); DateSelection = null; } if (GoalSelection != null) { GoalSelection.Dispose(); GoalSelection = null; } if (Highlight != null) { Highlight.Dispose(); Highlight = null; } if (Hour != null) { Hour.Dispose(); Hour = null; } if (LogHoursContainer != null) { LogHoursContainer.Dispose(); LogHoursContainer = null; } if (OrganisationSelection != null) { OrganisationSelection.Dispose(); OrganisationSelection = null; } if (ScrollView != null) { ScrollView.Dispose(); ScrollView = null; } if (UploadedImage != null) { UploadedImage.Dispose(); UploadedImage = null; } if (waiting != null) { waiting.Dispose(); waiting = null; } }