Example #1
0
        private void btnAdd_Click_1(object sender, EventArgs e)
        {
            DailyDetailsAddEditView frmDailyDetailsAdd = new DailyDetailsAddEditView(_selectedEmployeeId, _thisDate, _logic);

            frmDailyDetailsAdd.ShowDialog();
            FillDataGridView();
        }
Example #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dGVDailyResultsOverview.SelectedRows.Count > 0)
            {
                DailyDetailsAddEditView frmDailyDetailsEdit = new DailyDetailsAddEditView(
                    _selectedEmployeeId,
                    _thisDate,
                    _dailyDetailsViewModel.GetDailyResultById(Convert.ToInt32(dGVDailyResultsOverview.Rows[dGVDailyResultsOverview.CurrentCell.RowIndex].Cells[0].Value)),
                    _logic);
                frmDailyDetailsEdit.ShowDialog();
                FillDataGridView();
            }

            else
            {
                MessageBox.Show("Select record first");
            }
        }