Esempio n. 1
0
        private void MenuItem1_Click(object sender, EventArgs e)
        {
            var singleOrDefault = ((List <CaseControlDto>)dgvDataEnd.DataSource).SingleOrDefault(x => x.Id == _idCaseControl);
            var modifyUnits     = new ModifyUnits(UnitOfWork);

            if (singleOrDefault?.Code != null)
            {
                modifyUnits.Case = new Case {
                    Code = (int)singleOrDefault.Code
                }
            }
            ;
            modifyUnits.ShowDialog();
            FillGrid(Today);
        }
    }
Esempio n. 2
0
        private void MenuItem6_Click(object sender, EventArgs e)
        {
            var singleOrDefault = _listCases.SingleOrDefault(x => x.Id == _idCaseControl);
            var modifyUnits     = new ModifyUnits(_unitOfWork);

            if (singleOrDefault?.Code != null)
            {
                modifyUnits.Case = new Case {
                    Code = (int)singleOrDefault.Code
                }
            }
            ;
            modifyUnits.ShowDialog();
            FillListForDataGrid();
            dgvData.DataSource    = _listCases;
            dgvDataEnd.DataSource = _listCasesClosed;
        }