コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: Xendus/ParteUno
 private void Button_Click_3(object sender, RoutedEventArgs e)
 {
     if (Cartas.Count > 0 && DFactura.SelectedIndex > -1)
     {
         using (BaseDatos.BD.MiBD db = new BaseDatos.BD.MiBD())
         {
             using (var trans = db.Database.BeginTransaction())
             {
                 try
                 {
                     BaseDatos.BD.Ventas   fact = new BaseDatos.BD.Ventas();
                     BaseDatos.BD.Producto cart = new BaseDatos.BD.Producto();
                 }
             }
         }
     }
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: Xendus/ParteUno
 private void Button_Click_2(object sender, RoutedEventArgs e)
 {
     MiBD db = new MiBD();
     int id = (int)DFactura.SelectedValue;
     BaseDatos.BD.Producto p = db.Productoss.SingleOrDefault(x => x.IDCodigo == id);
     tempP = p;
     Cartas.RemoveAll(s => s.IDCodigo == tempP.IDCodigo);
     Cartas.Add(new BaseDatos.BD.Producto()
     {
         IDCodigo = tempP.IDCodigo,
         NombreP = tempP.NombreP,
         NombreCa = tempP.NombreCa,
         Precio = tempP.Precio,
     });
     Virtus();
     tempP = null;
 }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: Xendus/ParteUno
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            MiBD db = new MiBD();
            int  id = (int)DFactura.SelectedValue;

            BaseDatos.BD.Producto p = db.Productoss.SingleOrDefault(x => x.IDCodigo == id);
            tempP = p;
            Cartas.RemoveAll(s => s.IDCodigo == tempP.IDCodigo);
            Cartas.Add(new BaseDatos.BD.Producto()
            {
                IDCodigo = tempP.IDCodigo,
                NombreP  = tempP.NombreP,
                NombreCa = tempP.NombreCa,
                Precio   = tempP.Precio,
            });
            Virtus();
            tempP = null;
        }
コード例 #4
0
ファイル: MainWindow.xaml.cs プロジェクト: Xendus/ParteUno
 private void Button_Click_3(object sender, RoutedEventArgs e)
 {
     if (Cartas.Count > 0 && DFactura.SelectedIndex > -1)
     {
         using (BaseDatos.BD.MiBD db = new BaseDatos.BD.MiBD())
         {
             using (var trans = db.Database.BeginTransaction())
             {
                 try
                 {
                     BaseDatos.BD.Ventas fact = new BaseDatos.BD.Ventas();
                     BaseDatos.BD.Producto cart = new BaseDatos.BD.Producto();
                 }
             }
         }
     }
 }