Example #1
0
        private void AddedHandler(object sender, RecordAddedEventArgs eventArgs)
        {
            var indication = eventArgs.Indication;

            isSaved = false;
            indications.Add(indication);
            FillGrid();
        }
Example #2
0
        private void AddNewButton_Click(object sender, EventArgs e)
        {
            var indication = new Indication
                             (
                new Water(int.Parse(kitch_Cold_TB.Text), int.Parse(kitch_Hot_TB.Text)),
                new Water(int.Parse(bath_Cold_TB.Text), int.Parse(bath_Hot_TB.Text)),
                new Electricity(int.Parse(dayTB.Text), int.Parse(nightTB.Text)),
                DateTime.Now
                             );
            RecordAddedEventArgs eventArgs = new RecordAddedEventArgs()
            {
                Indication = indication
            };

            RecordAdded(this, eventArgs);
            this.Close();
        }