public void TestMethod1() { /*var res = ArticuloLogica.Instancia.ingresarBodega(1, "Bodega San Pedro", "123"); var result = ArticuloLogica.Instancia.obtenerBodegas(1); var result = ArticuloLogica.Instancia.ingresarArticulo(1, "100213", "Lápices Mongol", "unidad", "Son chinos", Convert.FromBase64String(""), 1);*/ //var res = ArticuloLogica.Instancia.obtenerArticulosBodega("Bodega San Pedro"); var orden = new Documento() { Fecha1= System.DateTime.Now, IdSocio = 2, TipoDocumento = 1, TotalAI = 1300 }; var detalle = new DocumentoDetalle(){ NumeroDocumento = 22, IdArticulo = 1, Cantidad = 10, Descripcion = "Lapices Mongol", IdBodega = 1, Impuesto = 13, Precio = 130, TipoDocumento = 1 }; Email email = new Email(); email.EnviarCorreo("*****@*****.**", orden, detalle); }
private static void verificarCantidadStock(int Bodega, int Articulo, int IdEmpresa) { Documento DocumentoOrden = new Documento(); DocumentoDetalle DetalleDocumento = new DocumentoDetalle(); try { //lectorSQL = AccesoDatosCV.verificarCantidadArticulo(Bodega, Articulo, IdEmpresa, (int)datosActuales.Get("idmoneda"), (int)datosActuales.Get("socio")); DataAccess da = new DataAccess(); DataSet lectorSQL2 = da.ExecuteQuery("SP_VERIFICAR_CANTIDAD_ARTICULO", new List<SqlParameter>() { new SqlParameter("@IdBodega",Bodega), new SqlParameter("@IdArticulo",Articulo), new SqlParameter("@IdEmpresa",IdEmpresa), new SqlParameter("@IdMoneda",(int)datosActuales.Get("idmoneda")), new SqlParameter("@IdSocio",(int)datosActuales.Get("socio")) }); if (lectorSQL2.Tables.Count == 6) { DocumentoOrden.TipoDocumento = OrdenCompra; DetalleDocumento.NumeroDocumento = (int)lectorSQL2.Tables[5].Rows[0].ItemArray[0]; DocumentoOrden.Fecha1 = (DateTime)lectorSQL2.Tables[5].Rows[0].ItemArray[1]; DocumentoOrden.TotalAI = (Decimal)lectorSQL2.Tables[5].Rows[0].ItemArray[5]; DetalleDocumento.Descripcion = (String)lectorSQL2.Tables[5].Rows[0].ItemArray[2]; DetalleDocumento.Cantidad = (int)lectorSQL2.Tables[5].Rows[0].ItemArray[3]; DetalleDocumento.Precio = (Decimal)lectorSQL2.Tables[5].Rows[0].ItemArray[4]; Email email = new Email(); email.EnviarCorreo((String)lectorSQL2.Tables[5].Rows[0].ItemArray[6], DocumentoOrden, DetalleDocumento); } else banderaError = 1; } catch (Exception ex) { return; } }