コード例 #1
0
        public void SetFactura(string subTotal, string total, string iva, int clienteID)
        {
            try
            {
                using (agrosysEntitiesFull facturaEntidad = new agrosysEntitiesFull())
                {
                    //se guarda la factura
                    factura objfactura = new factura();

                    objfactura.sub_total          = subTotal;
                    objfactura.iva                = iva;
                    objfactura.total              = total;
                    objfactura.cliente_id_cliente = clienteID;
                    facturaEntidad.facturas.Add(objfactura);
                    facturaEntidad.SaveChanges();
                }
            }
            catch (Exception)
            {
                throw new Exception("Hay un problema al guardar la tienda, por favor intente de nuevo.");
            }
        }
コード例 #2
0
ファイル: IngresoFacturas.cs プロジェクト: RebecaC/AgroSys
        public void SetFactura(string subTotal, string total, string iva, int clienteID)
        {
            try
            {
                      using (agrosysEntitiesFull facturaEntidad = new agrosysEntitiesFull())
                    {
                            //se guarda la factura
                              factura objfactura = new factura();

                              objfactura.sub_total = subTotal;
                              objfactura.iva = iva;
                              objfactura.total = total;
                              objfactura.cliente_id_cliente = clienteID;
                              facturaEntidad.facturas.Add(objfactura);
                              facturaEntidad.SaveChanges();
                           }

            }
            catch (Exception)
            {
                throw new Exception("Hay un problema al guardar la tienda, por favor intente de nuevo.");
            }
        }