Initial commit

Initial commit til Git.
V2 er deployed
This commit is contained in:
2026-06-13 17:31:50 +02:00
parent 9fcd2b145e
commit 41e23b6184
375 changed files with 15956 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using EpsonPrinter.Model;
using Pos.Models;
using Pos.Service;
namespace Pos
{
/// <summary>
/// Interaction logic for SaleOfDay.xaml
/// </summary>
public partial class SaleOfDay : Window
{
private bool _initialLoad = true;
private TotalSaleDetail totalSaleDetail;
public SaleOfDay()
{
InitializeComponent();
SaleService saleService = new SaleService();
totalSaleDetail = saleService.TotalSale(DateTime.Now);
TotalSale.Content = $"Dagens salg: kr. {totalSaleDetail.TotalSale:0.00}";
StartDatePicker.SelectedDate = DateTime.Now;
GridSaleDetail.ItemsSource = totalSaleDetail.TotalSaleCategories;
_initialLoad = false;
}
private void StartDatePicker_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
{
if (_initialLoad)
return;
_initialLoad = false;
DateTime selectedDate = DateTime.Parse(sender.ToString());
SaleService saleService = new SaleService();
totalSaleDetail = saleService.TotalSale(selectedDate);
TotalSale.Content = $"Dagens salg: kr. {totalSaleDetail.TotalSale:0.00}";
GridSaleDetail.ItemsSource = totalSaleDetail.TotalSaleCategories;
}
private void PrintSale_OnClick(object sender, RoutedEventArgs e)
{
SaleService saleService = new SaleService();
saleService.PrintSaleOfDay(StartDatePicker.SelectedDate.Value,totalSaleDetail);
}
}
}