public void InsertarValoresUnidadMedida(OrderedDictionary nuevosValores, int?IdServicio, int?IdMaterial) { try { UnidadMedida um = new UnidadMedida(); um.IdServicio = IdServicio; um.IdMaterial = IdMaterial; um.IdEstado = 68; LeerNuevosValores(um, nuevosValores); using (var db = new UnidadDeTrabajo()) { if (IdServicio != null) { if (ObtenerUM_x_Descripcion(um.Descripcion, IdServicio, null) == null) { db.UnidadMedida.Insertar(um); db.Grabar(); } } else { if (ObtenerUM_x_Descripcion(um.Descripcion, null, IdMaterial) == null) { db.UnidadMedida.Insertar(um); db.Grabar(); } } } } catch (Exception) { return; } }
public void InsertarValoresRecepcionDetalle(OrderedDictionary nuevosValores, int IdRecepcion) { RecepcionDetalle recDetalle = new RecepcionDetalle(); recDetalle.IdRecepcion = IdRecepcion; LeerNuevosValores(recDetalle, nuevosValores); using (var db = new UnidadDeTrabajo()) { db.RecepcionDetalle.Insertar(recDetalle); db.Grabar(); } }
public void InsertarValoresPrensaOrdenTrabajo(OrderedDictionary nuevosValores, int IdOrdenTrabajo) { PrensaOrdenTrabajo prensaOrden = new PrensaOrdenTrabajo(); prensaOrden.IdOrdenTrabajo = IdOrdenTrabajo; LeerNuevosValores(prensaOrden, nuevosValores); using (var db = new UnidadDeTrabajo()) { db.PrensaOrdenTrabajo.Insertar(prensaOrden); db.Grabar(); } }
public void InsertarValoresOrdenVentaDetalle(OrderedDictionary nuevosValores, int IdOrdenVenta) { OrdenVentaDetalle cotDetalle = new OrdenVentaDetalle(); cotDetalle.IdOrdenVenta = IdOrdenVenta; LeerNuevosValores(cotDetalle, nuevosValores); using (var db = new UnidadDeTrabajo()) { db.OrdenVentaDetalle.Insertar(cotDetalle); db.Grabar(); } }
public void InsertarValoresBodegaInventario(OrderedDictionary nuevosValores, int IdOrdenTrabajo) { BodegaInventarioOrdenTrabajo bodegaInventario = new BodegaInventarioOrdenTrabajo(); bodegaInventario.IdOrdenTrabajo = IdOrdenTrabajo; LeerNuevosValores(bodegaInventario, nuevosValores); using (var db = new UnidadDeTrabajo()) { db.BodegaInventarioCorte.Insertar(bodegaInventario); db.Grabar(); } }
public void InsertarValoresCotizacionDetalle(OrderedDictionary nuevosValores, int IdCotizacion, decimal precioDolar) { CotizacionDetalle cotDetalle = new CotizacionDetalle(); cotDetalle.IdCotizacion = IdCotizacion; cotDetalle.PrecioDolar = precioDolar; LeerNuevosValores(cotDetalle, nuevosValores); using (var db = new UnidadDeTrabajo()) { db.CotizacionDetalle.Insertar(cotDetalle); db.Grabar(); } }
public void InsertarValoresRequerimientoDetalle(OrderedDictionary nuevosValores, int IdRequerimiento, decimal precioDolar) { RequerimientoDetalle reqDetalle = new RequerimientoDetalle(); reqDetalle.IdRequerimiento = IdRequerimiento; reqDetalle.PrecioDolar = precioDolar; LeerNuevosValores(reqDetalle, nuevosValores); using (var db = new UnidadDeTrabajo()) { db.RequerimientoDetalle.Insertar(reqDetalle); db.Grabar(); } }
public void InsertarValoresSalidaMaterialDetalle(OrderedDictionary nuevosValores, int IdSalidaMaterial, decimal precioDolar) { SalidaMaterialesDetalle cotDetalle = new SalidaMaterialesDetalle(); cotDetalle.IdSalidaMaterial = IdSalidaMaterial; cotDetalle.PrecioDolar = precioDolar; cotDetalle.IdEstado = 62; LeerNuevosValores(cotDetalle, nuevosValores); using (var db = new UnidadDeTrabajo()) { db.SalidaMaterialesDetalle.Insertar(cotDetalle); db.Grabar(); } }
public void InsertarValoresMenuPerfil(OrderedDictionary nuevosValores, int IdUsuario) { try { MenuPerfil menuPerfil = new MenuPerfil(); menuPerfil.IdUsuario = IdUsuario; LeerNuevosValores(menuPerfil, nuevosValores); using (var db = new UnidadDeTrabajo()) { if (!ObtenerMenuPerfil(menuPerfil)) { db.MenuPerfil.Insertar(menuPerfil); db.Grabar(); } } } catch (Exception) { return; } }
public void InsertarValoresMarcaMaterial(OrderedDictionary nuevosValores, int IdMaterial) { try { MarcaMaterial um = new MarcaMaterial(); um.IdMaterial = IdMaterial; um.IdEstado = 70; LeerNuevosValores(um, nuevosValores); using (var db = new UnidadDeTrabajo()) { if (ObtenerMM_x_Descripcion(um.Descripcion, IdMaterial) == null) { db.MarcaMaterial.Insertar(um); db.Grabar(); } } } catch (Exception) { return; } }