public Buchhaltung(string weekNr)
        {
            InitializeComponent();
            LoadProducts();

            currWeek = new Week(weekNr); //Selects the current week

            GenerateDaysOfThWeekAndAddToWeek();

            LoadWeek(weekNr); //Needs to be loaded after Products

            dayOutput.Text = "Montag";
        }
Example #2
0
        public static bool CloseWindow;                                       //to close window

        #endregion

        #region Ctor´s

        /// <inheritdoc />
        /// <summary>
        /// Constructor if Week doesn´t exist
        /// </summary>
        /// <param name="weekNr"></param>
        /// <param name="name"></param>
        /// <param name="exTime"></param>
        /// <param name="lastCashDesk"></param>
        public Buchhaltung(string weekNr, string name, DateTime exTime, double lastCashDesk)
        {
            InitializeComponent();

            LoadProducts();

            CurrWeek = new Week(weekNr, exTime, name, lastCashDesk); //Selects the current week

            GenerateDaysOfThWeekAndAddToWeek();

            SaveEntrys();

            DayOutput.Text = "Montag";

            FillWeekInfo();
        }
Example #3
0
        /// <summary>
        /// Constructor if week does exist
        /// </summary>
        /// <param name="weekNr"></param>
        public Buchhaltung(string weekNr)
        {
            InitializeComponent();
            LoadProducts();

            CurrWeek = new Week(weekNr); //Selects the current week

            GenerateDaysOfThWeekAndAddToWeek();

            LoadWeek(weekNr); //Needs to be loaded after Products

            ReCalcAndUpdateInfoLine();

            DayOutput.Text = "Montag";

            FillWeekInfo();
        }
Example #4
0
        /// <summary>
        /// Calls window to edit entry
        /// </summary>
        private void EditTable_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            //string weekNr, string name, DateTime exTime, double lastCashDesks
            EditDataGrid ed = new EditDataGrid();

            ed.Show();

            ed.Closed += (x, y) =>
            {
                string nr = CurrWeek.WeekNr;
                CurrWeek = new Week(nr);
                GenerateDaysOfThWeekAndAddToWeek();
                LoadWeek(nr);
                FillEntryTable();
                ReCalcAndUpdateInfoLine();
            };
        }