public static string Insertar3(int idtrabajador, int idproveedor, DateTime fecha, string tipo_comprobante, string serie, string correlativo, decimal igv, string estado, DataTable dtDetalles) { Dingreso Obj = new Dingreso { Idtrabajador = idtrabajador, Idproveedor = idproveedor, Fecha = fecha, Tipo_Comprobante = tipo_comprobante, Serie = serie, Correlativo = correlativo, Igv = igv, Estado = estado }; List <Ddetalleingreso> detalles = new List <Ddetalleingreso>(); foreach (DataRow row in dtDetalles.Rows) { Ddetalleingreso detalle = new Ddetalleingreso { Idarticulo = Convert.ToInt32(row["idarticulo"].ToString()), Precio_Compra = Convert.ToDecimal(row["precio_compra"].ToString()), Precio_Venta = Convert.ToDecimal(row["precio_venta"].ToString()), Stock_Inicial = Convert.ToInt32(row["stock_inicial"].ToString()), Stock_Actual = Convert.ToInt32(row["stock_inicial"].ToString()), Fecha_Produccion = Convert.ToDateTime(row["fecha_ingreso"].ToString()), Fecha_Vencimiento = Convert.ToDateTime(row["fecha_modificacion"].ToString()) }; detalles.Add(detalle); } return(Obj.Insertar3(Obj, detalles)); }
public static string Insertar(int idTrabajador, int idProveedor, DateTime fecha, string tipoComprobante, string serie, string correlativo, decimal itbis, string estado, DataTable dtDetalles) { Dingreso Ingreso = new Dingreso() { IdTrabajador = idTrabajador, IdProveedor = idProveedor, Fecha = fecha, TipoComprobante = tipoComprobante, Serie = serie, Correlativo = correlativo, Itbis = itbis, Estado = estado }; var ListaDetalles = new List <DdetalleIngreso>(); foreach (DataRow filasDetalles in dtDetalles.Rows) { DdetalleIngreso detalleIngreso = new DdetalleIngreso(); detalleIngreso.IdArticulo = Convert.ToInt32(filasDetalles["idarticulo"].ToString()); detalleIngreso.PrecioCompra = Convert.ToDecimal(filasDetalles["precio_compra"].ToString()); detalleIngreso.PrecioVenta = Convert.ToDecimal(filasDetalles["precio_venta"].ToString()); detalleIngreso.StockInicial = Convert.ToInt32(filasDetalles["stock_inicial"].ToString()); detalleIngreso.StockActual = Convert.ToInt32(filasDetalles["stock_inicial"].ToString()); detalleIngreso.FechaProduccion = Convert.ToDateTime(filasDetalles["fecha_produccion"].ToString()); detalleIngreso.FechaVencimiento = Convert.ToDateTime(filasDetalles["fecha_vencimiento"].ToString()); ListaDetalles.Add(detalleIngreso); } return(Ingreso.Insertar(Ingreso, ListaDetalles)); }
public static string Anular(int idingreso) { Dingreso Obj = new Dingreso { Idingreso = idingreso }; return(Obj.Anular(Obj)); }
public static string Anular(int idIngreso) { Dingreso Ingreso = new Dingreso() { IdIngreso = idIngreso }; return(Ingreso.Anular(Ingreso)); }
public static DataTable MostrarDetalle(string textobuscar) { Dingreso Obj = new Dingreso(); return(Obj.Mostrardetalle(textobuscar)); }
//Método BuscarFecha que llama al método BuscarNombre //de la clase DIngreso de la CapaDatos public static DataTable BuscarFechas(string textobuscar, string textobuscar2) { Dingreso Obj = new Dingreso(); return(Obj.BuscarFechas(textobuscar, textobuscar2)); }
public static DataTable MostrarDetalles(string textoBuscar) { Dingreso Ingreso = new Dingreso(); return(Ingreso.MostrarDetalles(textoBuscar)); }
public static DataTable BuscarFechas(string fechaInicio, string fechaFin) { Dingreso Ingreso = new Dingreso(); return(Ingreso.BuscarFechas(fechaInicio, fechaFin)); }