Пример #1
0
        private void MyGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            MyTableGrid s    = MyGrid.SelectedItem as MyTableGrid;
            MContext    mc   = new MContext();
            InfoSKU     isku = new InfoSKU(mc.SKUs.First(x => x.ID == s.ID));

            isku.ShowDialog();
        }
Пример #2
0
 private void DGS_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         MyGridMainMenu s    = DGS.SelectedItem as MyGridMainMenu;
         MContext       mc   = new MContext();
         InfoSKU        isku = new InfoSKU(mc.SKUs.First(x => x.ID == s.ID));
         isku.ShowDialog();
     }
     catch
     {
         SkuAnot  s    = DGS.SelectedItem as SkuAnot;
         MContext mc   = new MContext();
         EnterID  isku = new EnterID(mc.SAs.First(x => x.ID == s.ID).ID);
     }
 }
Пример #3
0
 void FSerch(int id)
 {
     try
     {
         MContext mc = new MContext();
         if (mc.SKUs.Any(x => x.ID == id))
         {
             SKU     s    = mc.SKUs.First(x => x.ID == id);
             InfoSKU asku = new InfoSKU(s);
             asku.ShowDialog();
             this.Close();
         }
         else
         {
             MessageBox.Show("Товар с таким ID не найден");
         }
     }
     catch
     {
         MessageBox.Show("Введен не корректный ID");
         IDNumber.Clear();
     }
 }