private void BtnEditAllotmentRepo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (uc.AllotmentGridView.GetFocusedRow() is Allotments item) { frmAddEditAllotment frm = new frmAddEditAllotment(Models.MethodType.Edit, item); frm.ShowDialog(); Detail(new UnitOfWork().AppropriationsRepoRepo.Find(m => m.Id == Appropriations.Id)); } }
private void BtnAllotments_Click(object sender, EventArgs e) { if (this.uc.AppropriationGrid.GetFocusedRow() is Appropriations item) { frmAddEditAllotment frm = new frmAddEditAllotment(Models.MethodType.Add, new Models.Allotments() { Appropriations = item }); frm.ShowDialog(); Detail(new UnitOfWork().AppropriationsRepoRepo.Find(m => m.Id == item.Id)); } }