Ejemplo n.º 1
0
 private void _clientPhucKhao_BIEN_BAN_CHAM_THI_SearchCompleted(object sender, BIEN_BAN_CHAM_THI_SearchCompletedEventArgs e)
 {
     try
     {
         if (e.Result != null)
         {
             _dataItemPhucKhao = new ObservableExpandCollection();
             foreach (var item in e.Result)
                 _dataItemPhucKhao.Add(new BIEN_BAN_CHAM_THI_EX() { ItemContent = item });
             _dataItemPhucKhao.Refesh();
             OnPropertyChanged("DataItemPhucKhao");
             if (_dataItemPhucKhao.Count == 0)
                 ActionMenuService.SetAction(ActionCommand, null, null, ActionCommand, null, null, null);
             else
                 ActionMenuService.SetAction(ActionCommand, null, ActionCommand, ActionCommand, ActionCommand, ActionCommand, null);
         }
     }
     catch (Exception ex) { MessagePop.SetError(ex.Message); }
     finally
     {
         PopupService.Free();
     }
 }
Ejemplo n.º 2
0
 private void _clientBienBanThi_BIEN_BAN_CHAM_THI_SearchCompleted(object sender, BIEN_BAN_CHAM_THI_SearchCompletedEventArgs e)
 {
     try
     {
         if (e.Result != null)
         {
             _dataItemBienBanChamThi.Clear();
             foreach (var item in e.Result)
             {
                 var newBBT = new BIEN_BAN_CHAM_THI_EX() { ItemContent = item };
                 newBBT.ChangeTesterId += (s, ex) => {
                     if(DataItemNhanSu.Count>0)
                     newBBT.ItemContent.tenGiamKhao = DataItemNhanSu.Where(p => p.maNhanSu == newBBT.MaGiamKhao).FirstOrDefault().hoVaTen;
                 };
                 _dataItemBienBanChamThi.Add(newBBT);
             }
             OnPropertyChanged("DataItemBienBanChamThi");
         }
     }
     catch (Exception ex)
     {
         MessagePop.SetError(ex.Message);
     }
 }