Example #1
0
 public VlozitHrace(ItemHrac hracik, int id, SpravaHracu spravaHracu)
 {
     InitializeComponent();
     StartPosition  = FormStartPosition.CenterScreen;
     _domainPost    = new DomainPost();
     _domainKluby   = new DomainKluby();
     _domainHraci   = new DomainHraci();
     _id            = id;
     form           = spravaHracu;
     Hrac           = hracik;
     Initialization = InitializeAsync();
 }
Example #2
0
 public DetailHrace(ItemHrac hrac, SpravaHracu spravaHracu)
 {
     InitializeComponent();
     StartPosition  = FormStartPosition.CenterScreen;
     _domainHraci   = new DomainHraci();
     _domainPost    = new DomainPost();
     _domainKluby   = new DomainKluby();
     Hrac           = hrac;
     form           = spravaHracu;
     Initialization = GetPostList();
     LoadInfo();
 }
Example #3
0
        private ItemHrac GetHrac(int id)
        {
            ItemHrac hraci = new ItemHrac();

            foreach (var hrac in _hraci)
            {
                if (hrac.Hid == id)
                {
                    return(hrac);
                }
            }

            return(hraci);
        }
Example #4
0
 public async Task DeleteHrac(ItemHrac hrac)
 {
     await Task.Run(() => _context.Where(h => h.Hid == hrac.Hid).Delete());
 }
Example #5
0
 public async Task UpdateHrac(ItemHrac hrac)
 {
     await Task.Run(() => _context.Where(h => h.Hid == hrac.Hid).Update(hrac));
 }
Example #6
0
 public async Task InsertHrac(ItemHrac hrac)
 {
     await Task.Run(() => _context.Insert(hrac));
 }
Example #7
0
 public async Task DeleteHrac(ItemHrac hrac)
 {
     await _unitOfWork.Hraci.DeleteHrac(hrac);
 }
Example #8
0
 public async Task InsertHrac(ItemHrac hrac)
 {
     await _unitOfWork.Hraci.InsertHrac(hrac);
 }
Example #9
0
 public async Task UpdateHrac(ItemHrac hrac)
 {
     await _unitOfWork.Hraci.UpdateHrac(hrac);
 }