Пример #1
0
 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));
     }
 }
Пример #2
0
 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));
     }
 }
Пример #3
0
 public AddEditAllotment(frmAddEditAllotment frm, Allotments allotments)
 {
     this.frm        = frm;
     this.allotments = allotments;
 }