private void btnLuu_Click(object sender, RoutedEventArgs e)
 {
     if (CheckValues())
     {
         if (_Item == null)
         {
             _Item         = new Data.KHO();
             _Item.Visual  = true;
             _Item.Deleted = false;
             _Item.Edit    = false;
         }
         GetValues();
         DialogResult = true;
     }
 }
 private void btnLuu_Click(object sender, RoutedEventArgs e)
 {
     if (CheckValues())
     {
         if (_Item == null)
         {
             _Item = new Data.KHO();
             _Item.Visual = true;
             _Item.Deleted = false;
             _Item.Edit = false;
         }
         GetValues();
         DialogResult = true;
     }
 }
Ejemplo n.º 3
0
 private void btnXoa_Click(object sender, RoutedEventArgs e)
 {
     if (lvData.SelectedItems.Count > 0)
     {
         if (lvData.SelectedItems.Count > 0)
         {
             Data.KHO item = (Data.KHO)lvData.SelectedItems[0];
             if (item.KhoID > 0)
             {
                 item.Deleted = true;
             }
             lsArray.Remove(item);
             lvData.Items.Refresh();
         }
     }
 }
 private void LoadData(ListBox lv, Data.KHO kho)
 {
     lv.ItemsSource = Data.BOTonKho.GetTonKhoByKho(mKaraokeEntities, kho);
 }