public Boolean GuardarDB(prod_GestionProductivaAcero_CusTalme_x_in_movi_inven_Info Info)
        {
            try
            {
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    var Address = new prod_GestionProductivaAcero_CusTalme_x_in_movi_inven();

                    Address.gp_IdEmpresa         = Info.gp_IdEmpresa;
                    Address.gp_IdSucursal        = Info.gp_IdSucursal;
                    Address.gp_IdGestionAceria   = Info.gp_IdGestionAceria;
                    Address.mv_IdEmpresa         = Info.mv_IdEmpresa;
                    Address.mv_IdSucursal        = Info.mv_IdSucursal;
                    Address.mv_IdBodega          = Info.mv_IdBodega;
                    Address.mv_IdMovi_inven_tipo = Info.mv_IdMovi_inven_tipo;
                    Address.mv_IdNumMovi         = Info.mv_IdNumMovi;

                    Context.prod_GestionProductivaAcero_CusTalme_x_in_movi_inven.Add(Address);
                    Context.SaveChanges();
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
        public Boolean GuardarDB(prod_ModeloProduccion_x_Producto_CusTal_Info Info, ref String Mensaje)
        {
            try
            {
                List <prod_ModeloProduccion_x_Producto_CusTal_Info> Lst = new List <prod_ModeloProduccion_x_Producto_CusTal_Info>();
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    var Address = new prod_ModeloProduccion_x_Producto_CusTal();

                    Address.IdEmpresa    = Info.IdEmpresa;
                    Address.IdModeloProd = Info.IdModeloProd;
                    Address.IdProducto   = Info.IdProducto;
                    Address.Tipo         = Info.Tipo;

                    Context.prod_ModeloProduccion_x_Producto_CusTal.Add(Address);
                    Context.SaveChanges();
                    Mensaje = "Guardado Ok";
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
Beispiel #3
0
 public Boolean AnularDB(prod_GestionProductivaAcero_CusTalme_Info Info, ref string Mensaje)
 {
     try
     {
         using (EntitiesProduccion oEnt = new EntitiesProduccion())
         {
             var Contact = oEnt.prod_GestionProductivaAcero_CusTalme.FirstOrDefault(var => var.IdEmpresa == Info.IdEmpresa && var.IdGestionAceria == Info.IdGestionAceria && var.IdSucursal == Info.IdSucursal);
             if (Contact != null)
             {
                 Contact.Estado = "I";
                 oEnt.SaveChanges();
                 Mensaje = "Se Ha procedido Anular Con exito La Transaccion # " + Info.IdGestionAceria;
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         mensaje = ex.ToString() + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         throw new Exception(ex.ToString().ToString());
     }
 }
Beispiel #4
0
 public Boolean Anular(prod_CompraChatarra_CusTalme_Info Info, ref string Mensaje)
 {
     try
     {
         using (EntitiesProduccion oEnt = new EntitiesProduccion())
         {
             var Contact = oEnt.prod_CompraChatarra_CusTalme.FirstOrDefault(var => var.IdEmpresa == Info.IdEmpresa && var.IdLiquidacion == Info.IdLiquidacion);
             if (Contact != null)
             {
                 Contact.Estado       = "I";
                 Contact.Fecha_UltAnu = Info.Fecha_UltAnu;
                 Contact.IdUsuario    = Info.IdUsuario;
                 Contact.ip           = Info.ip;
                 Contact.nom_pc       = Info.nom_pc;
                 oEnt.SaveChanges();
                 Mensaje = "Se Ha procedido Anular Con exito La Transaccion # " + Info.IdLiquidacion;
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         mensaje = ex.ToString() + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         throw new Exception(ex.ToString());
     }
 }
Beispiel #5
0
 public Boolean AnularDB(prd_Operador_Info info, ref string msg)
 {
     try
     {
         using (EntitiesProduccion context = new EntitiesProduccion())
         {
             var Address = context.prod_Operador.FirstOrDefault(A => A.IdOperador == info.IdOperador && A.IdEmpleado == info.IdEmpleado);
             if (Address != null)
             {
                 Address.Estado = info.Estado;
                 context.SaveChanges();
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         msg = ex.ToString() + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref msg);
         throw new Exception(ex.ToString());
     }
 }
Beispiel #6
0
        public Boolean ModificarDB(prod_ChatarraTipo_CusTalme_Info prI, ref string mensaje)
        {
            try
            {
                using (EntitiesProduccion context = new EntitiesProduccion())
                {
                    var contact = context.prod_ChatarraTipo_CusTalme.FirstOrDefault(VProdu => VProdu.IdEmpresa == prI.IdEmpresa && VProdu.IdTipoChatarra == prI.IdTipoChatarra);
                    if (contact != null)
                    {
                        contact.Precio      = prI.Precio;
                        contact.Descripcion = prI.Descripcion;
                        contact.Estado      = prI.Estado;

                        context.SaveChanges();

                        mensaje = "Se ha procedido a actualizar los datos exitosamente...";
                    }
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString() + " " + ex.Message;
                throw new Exception(ex.ToString());
            }
        }
Beispiel #7
0
 public Boolean AnularDB(prod_ChatarraTipo_CusTalme_Info info)
 {
     try
     {
         using (EntitiesProduccion context = new EntitiesProduccion())
         {
             var contact = context.prod_ChatarraTipo_CusTalme.FirstOrDefault(minfo => minfo.IdEmpresa == info.IdEmpresa && minfo.IdTipoChatarra == info.IdTipoChatarra);
             if (contact != null)
             {
                 contact.Estado = "I";
                 context.SaveChanges();
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = ex.ToString() + " " + ex.Message;
         throw new Exception(ex.ToString());
     }
 }
Beispiel #8
0
        public Boolean GrabarDB(prod_ChatarraTipo_CusTalme_Info Lst, ref int Id, ref string mensaje)
        {
            try
            {
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    prod_ChatarraTipo_CusTalme Deta = new prod_ChatarraTipo_CusTalme();

                    Deta.IdEmpresa      = Lst.IdEmpresa;
                    Deta.IdTipoChatarra = Id = GetId(Lst.IdEmpresa);
                    Deta.Precio         = Lst.Precio;
                    Deta.Descripcion    = Lst.Descripcion;
                    Deta.Estado         = Lst.Estado;

                    Context.prod_ChatarraTipo_CusTalme.Add(Deta);
                    Context.SaveChanges();
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString() + " " + ex.Message;
                throw new Exception(ex.ToString());
            }
        }
 public Boolean ModificarDB(prod_ProgramaProd_Info info)
 {
     try
     {
         using (EntitiesProduccion context = new EntitiesProduccion())
         {
             var contact = context.prod_ProgramaProd.FirstOrDefault(minfo => minfo.IdEmpresa == info.IdEmpresa && minfo.IdProgramaProd == info.IdProgramaProd);
             if (contact != null)
             {
                 contact.IdTurno     = info.IdTurno;
                 contact.Fecha       = info.Fecha;
                 contact.IdProducto  = info.IdProducto;
                 contact.IdCategoria = info.IdCategoria;
                 contact.Unidad      = info.Unidad;
                 contact.Peso        = info.Peso;
                 contact.Toneladas   = info.Toneladas;
                 contact.Pedidos     = info.Pedidos;
                 context.SaveChanges();
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = ex.ToString() + " " + ex.Message;
         return(false);
     }
 }
Beispiel #10
0
 public Boolean GuardarDB(prd_PuenteGrua_Info info, ref string msg)
 {
     try
     {
         using (EntitiesProduccion Context = new EntitiesProduccion())
         {
             prod_PuenteGrua Address = new prod_PuenteGrua();
             Address.idEmpresa        = info.idEmpresa;
             Address.Idsucural        = info.Idsucural;
             Address.idPuenteGrua     = info.idPuenteGrua;
             Address.nombre           = info.nombre;
             Address.marca            = info.marca;
             Address.tonelada_Soporta = info.tonelada_Soporta;
             Address.IdUsuario        = info.IdUsuario;
             Address.ip            = info.ip;
             Address.nom_pc        = info.nom_pc;
             Address.Fecha_Transac = info.Fecha_Transac;
             Address.estado        = info.estado;
             Address.IdOperador    = info.IdOperador;
             Context.prod_PuenteGrua.Add(Address);
             Context.SaveChanges();
         }
         msg = "Grabación exitosa..";
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         msg = ex.ToString() + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref msg);
         throw new Exception(ex.ToString());
     }
 }
 public Boolean ModificarDB(prod_GestionProductivaLaminado_CusTalme_Info Info)
 {
     try
     {
         using (EntitiesProduccion oEnt = new EntitiesProduccion())
         {
             var Contact = oEnt.prod_GestionProductivaLaminado_CusTalme.First(var => var.IdEmpresa == Info.IdEmpresa && var.IdGestionProductiva == Info.IdGestionProductiva);
             Contact.IdTurno = Info.IdTurno;
             Contact.IdEmpleado_JefeTurno   = Info.IdEmpleado_JefeTurno;
             Contact.Id_Bobina              = Info.Id_Bobina;
             Contact.Num_Orden              = Info.Num_Orden;
             Contact.kg_Cargados            = Info.kg_Cargados;
             Contact.kg_producidos          = Info.kg_producidos;
             Contact.kg_retazo_porcen       = Info.kg_retazo_porcen;
             Contact.kg_retazo_valor        = Info.kg_retazo_valor;
             Contact.kg_chatarra_porcen     = Info.kg_chatarra_porcen;
             Contact.kg_chatarra_valor      = Info.kg_chatarra_valor;
             Contact.kg_oxidacion_porcen    = Info.kg_oxidacion_porcen;
             Contact.kg_oxidacion_valor     = Info.kg_oxidacion_valor;
             Contact.rendi_metal_historico  = Info.rendi_metal_historico;
             Contact.rendi_metal_real       = Info.rendi_metal_real;
             Contact.rendi_metal_Diferencia = Info.rendi_metal_Diferencia;
             Contact.consumo_kilowatios     = Info.consumo_kilowatios;
             Contact.consumo_galones        = Info.consumo_galones;
             Contact.cambio_prue_programado = Info.cambio_prue_programado;
             Contact.cambio_prue_real       = Info.cambio_prue_real;
             Contact.cambio_prue_porcentaje = Info.cambio_prue_porcentaje;
             Contact.hora_turno_ini         = Info.hora_turno_ini;
             Contact.hora_turno_fin         = Info.hora_turno_fin;
             Contact.hora_jornada           = Info.hora_jornada;
             Contact.hora_productiva        = Info.hora_productiva;
             Contact.hora_Paros             = Info.hora_Paros;
             Contact.hora_Neta              = Info.hora_Neta;
             Contact.hora_Hrs_Maquina       = Info.hora_Hrs_Maquina;
             Contact.Ton_Programada         = Info.Ton_Programada;
             Contact.Ton_real             = Info.Ton_real;
             Contact.Ton_Eficiencia       = Info.Ton_Eficiencia;
             Contact.Ton_TnHrNeta         = Info.Ton_TnHrNeta;
             Contact.Ton_kwTon            = Info.Ton_kwTon;
             Contact.Ton_GlsTon           = Info.Ton_GlsTon;
             Contact.EficienciaProduccion = Info.EficienciaProduccion;
             Contact.Fecha = Info.Fecha;
             oEnt.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         mensaje = ex.InnerException + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         throw new Exception(ex.InnerException.ToString());
     }
 }
        public Boolean GuardarDB(prod_GestionProductivaTechos_CusTalme_Cab_Info Info, ref decimal Id)
        {
            try
            {
                List <prod_GestionProductivaTechos_CusTalme_Cab_Info> Lst = new List <prod_GestionProductivaTechos_CusTalme_Cab_Info>();
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    var Address = new prod_GestionProductivaTechos_CusTalme_Cab();

                    Address.IdEmpresa               = Info.IdEmpresa;
                    Address.IdGestionProductiva     = Id = GetId(Info.IdEmpresa);
                    Address.IdProducto_MateriaPrima = Info.IdProducto_MateriaPrima;
                    Address.Fecha        = Info.Fecha;
                    Address.IdModeloProd = Info.IdModeloProd;
                    Address.HrsTurno     = Info.HrsTurno;
                    Address.Tprep        = Info.Tprep;
                    Address.Despacho     = Info.Despacho;
                    Address.Factor       = Info.Factor;
                    Address.Num_Personas = Info.Num_Personas;
                    Address.Consumo      = Info.Consumo;
                    Address.Chatarra     = Info.Chatarra;
                    Address.IdTurno      = Info.IdTurno;

                    Address.ip               = Info.ip;
                    Address.Fecha_Transac    = Info.Fecha_Transac;
                    Address.nom_pc           = Info.nom_pc;
                    Address.IdUsuarioUltModi = Info.IdUsuarioUltModi;
                    Address.Fecha_UltMod     = Info.Fecha_UltMod;
                    Address.Estado           = "A";

                    Info.ListaDetalle.ForEach(var => { var.IdGestionProductiva = Address.IdGestionProductiva; var.IdEmpresa = Address.IdEmpresa; });

                    Context.prod_GestionProductivaTechos_CusTalme_Cab.Add(Address);
                    Context.SaveChanges();

                    if (dataDetalle.GuardarDB(Info.ListaDetalle))
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
Beispiel #13
0
        public Boolean GuardarDB(prod_CompraChatarra_CusTalme_Info Info, ref decimal IdLiquidacion, ref string Mensaje)
        {
            try
            {
                List <prod_CompraChatarra_CusTalme_Info> Lst = new List <prod_CompraChatarra_CusTalme_Info>();
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    var Address = new prod_CompraChatarra_CusTalme();

                    Address.IdEmpresa         = Info.IdEmpresa;
                    Address.IdLiquidacion     = IdLiquidacion = GetId(Info.IdEmpresa);
                    Address.IdProveedor_Presu = Info.IdProveedor_Presu;
                    Address.IdProveedor       = Info.IdProveedor;
                    Address.Fecha             = Info.Fecha;
                    Address.Beneficiario      = Info.Beneficiario;
                    Address.Placa             = Info.Placa;
                    Address.IdTipoChatarra    = Info.IdTipoChatarra;
                    Address.PrecioChatarra    = Info.PrecioChatarra;
                    Address.TLlenoKg          = Info.TLlenoKg;
                    Address.TVacionKg         = Info.TVacionKg;
                    Address.TMermaKg          = Info.TMermaKg;
                    Address.TNetokg           = Info.TNetokg;
                    Address.Subtotal          = Info.Subtotal;
                    Address.Descuento         = Info.Descuento;
                    Address.Total             = Info.Total;
                    Address.IdUsuario         = Info.IdUsuario;
                    Address.IdUsuarioUltMod   = Info.IdUsuario;
                    Address.Fecha_Transa      = Info.Fecha_Transaccion;
                    Address.Fecha_UltMod      = Info.Fecha_UltMod;
                    Address.ip     = Info.ip;
                    Info.nom_pc    = Info.nom_pc;
                    Address.Estado = "A";

                    Context.prod_CompraChatarra_CusTalme.Add(Address);
                    Context.SaveChanges();

                    Mensaje = "Registro # " + IdLiquidacion + " Ingresado Correctamente";
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
Beispiel #14
0
        public Boolean GuardarDB(List <prod_Clave_Autorizacion_Info> Lst, int IdEMpresa)
        {
            try
            {
                int     Secuencia  = 1;
                decimal IdGenerado = GetId(IdEMpresa);
                foreach (var Info in Lst)
                {
                    using (EntitiesProduccion Context = new EntitiesProduccion())
                    {
                        var Address = new prod_Clave_Autorizacion();

                        Address.IdEmpresa          = Info.IdEmpresa;
                        Address.IdGeneracion       = IdGenerado;
                        Address.Secuencia          = Secuencia;
                        Address.IdModeloProduccion = Info.IdModeloProduccion;
                        Address.Clave = Info.Clave;
                        Address.IdUsuarioUsoDeClave = Info.IdUsuarioUsoDeClave;
                        Address.FechaUsoDeClave     = Info.FechaUsoDeClave;
                        Address.IdUsuarioGeneracion = Info.IdUsuarioGeneracion;
                        Address.FechaGeneracion     = Info.FechaGeneracion;
                        Address.IdTransaccion       = Info.IdTransaccion;
                        Address.Activo = "A";
                        Secuencia++;
                        Context.prod_Clave_Autorizacion.Add(Address);
                        Context.SaveChanges();
                    }
                }

                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
Beispiel #15
0
 public Boolean ModificarDB(prd_PuenteGrua_Info info, ref string msg)
 {
     try
     {
         using (EntitiesProduccion context = new EntitiesProduccion())
         {
             var contact = context.prod_PuenteGrua.FirstOrDefault(A => A.idEmpresa == info.idEmpresa && A.Idsucural == info.Idsucural && A.idPuenteGrua == info.idPuenteGrua);
             if (contact != null)
             {
                 //prod_PuenteGrua Address = new prod_PuenteGrua();
                 contact.idEmpresa        = info.idEmpresa;
                 contact.Idsucural        = info.Idsucural;
                 contact.idPuenteGrua     = info.idPuenteGrua;
                 contact.nombre           = info.nombre;
                 contact.marca            = info.marca;
                 contact.tonelada_Soporta = info.tonelada_Soporta;
                 contact.IdUsuario        = info.IdUsuario;
                 contact.ip              = info.ip;
                 contact.nom_pc          = info.nom_pc;
                 contact.Fecha_Transac   = info.Fecha_Transac;
                 contact.estado          = info.estado;
                 contact.IdUsuarioUltMod = info.IdUsuario;
                 contact.IdOperador      = info.IdOperador;
                 contact.Fecha_UltMod    = DateTime.Now;
                 // Context.prod_PuenteGrua.Add(Address);
                 context.SaveChanges();
             }
         }
         // msg = "Se ha procedido actualizar el registro de la Orden de Taller #: " + info.Codigo + " exitosamente";
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         msg = ex.ToString() + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref msg);
         throw new Exception(ex.ToString());
     }
 }
Beispiel #16
0
        public Boolean GuardarDB(prd_Operador_Info info, ref string msg)
        {
            try
            {
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    prod_Operador Address = new prod_Operador();

                    Address.IdOperador      = info.IdOperador;
                    Address.IdEmpleado      = info.IdEmpleado;
                    Address.NomEmpleado     = info.NomEmpleado;
                    Address.IdUsuario       = info.IdUsuario;
                    Address.Fecha_Transac   = DateTime.Now;
                    Address.IdUsuarioUltMod = info.IdUsuarioUltMod;
                    Address.Fecha_UltMod    = null;
                    Address.IdUsuarioUltAnu = info.IdUsuarioUltAnu;
                    Address.Fecha_UltAnu    = null;
                    Address.nom_pc          = info.nom_pc;


                    Address.ip        = info.ip;
                    Address.MotiAnula = info.MotiAnula;
                    Address.Estado    = info.Estado;

                    Context.prod_Operador.Add(Address);
                    Context.SaveChanges();
                }
                msg = "Grabación exitosa..";
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                msg = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref msg);
                throw new Exception(ex.ToString());
            }
        }
Beispiel #17
0
 public Boolean ModificarDB(prd_Operador_Info info, ref string msg)
 {
     try
     {
         using (EntitiesProduccion context = new EntitiesProduccion())
         {
             var Address = context.prod_Operador.FirstOrDefault(A => A.IdOperador == info.IdOperador && A.IdEmpleado == info.IdEmpleado);
             if (Address != null)
             {
                 Address.IdOperador      = info.IdOperador;
                 Address.IdEmpleado      = info.IdEmpleado;
                 Address.NomEmpleado     = info.NomEmpleado;
                 Address.IdUsuario       = info.IdUsuario;
                 Address.Fecha_Transac   = info.Fecha_Transac;
                 Address.IdUsuarioUltMod = info.IdUsuario;
                 Address.Fecha_UltMod    = DateTime.Now;
                 Address.IdUsuarioUltAnu = info.IdUsuarioUltAnu;
                 Address.Fecha_UltAnu    = null;
                 Address.nom_pc          = info.nom_pc;
                 Address.ip        = info.ip;
                 Address.MotiAnula = info.MotiAnula;
                 Address.Estado    = info.Estado;
                 // Context.prod_Operador.Add(Address);
                 context.SaveChanges();
             }
         }
         // msg = "Se ha procedido actualizar el registro de la Orden de Taller #: " + info.Codigo + " exitosamente";
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         msg = ex.ToString() + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref msg);
         throw new Exception(ex.ToString());
     }
 }
Beispiel #18
0
        public Boolean GuardarDB(List <prod_LiquidacionChatarraDetalle_Info> Lst)
        {
            try
            {
                int sec = 1;
                foreach (var Info  in Lst)
                {
                    using (EntitiesProduccion Context = new EntitiesProduccion())
                    {
                        var Address = new prod_LiquidacionChatarraDetalle();

                        Address.IdEmpresa           = Info.IdEmpresa;
                        Address.IdLiquidacion       = Info.IdLiquidacion;
                        Address.Secuencia           = sec;
                        Address.LLeno               = Info.LLeno;
                        Address.Vacio               = Info.Vacio;
                        Address.Merma               = Info.Merma;
                        Address.Neta                = Info.Neta;
                        Address.fecha_pesaje_lleno  = Info.fecha_pesaje_lleno;
                        Address.fecha_pesaje_vacion = Info.fecha_pesaje_vacion;
                        Address.Placa               = Info.Placa;
                        sec++;
                        Context.prod_LiquidacionChatarraDetalle.Add(Address);
                        Context.SaveChanges();
                    }
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
 public Boolean Borrar(int IdEmpresa, int IdModeloProduccion, Decimal IdProducto)
 {
     try
     {
         using (EntitiesProduccion context = new EntitiesProduccion())
         {
             var contact = context.prod_ModeloProduccion_x_Producto_CusTal.First(obj => obj.IdEmpresa == IdEmpresa && obj.IdModeloProd == IdModeloProduccion && obj.IdProducto == IdProducto);
             context.prod_ModeloProduccion_x_Producto_CusTal.Remove(contact);
             context.SaveChanges();
             context.Dispose();
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         mensaje = ex.ToString() + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         throw new Exception(ex.ToString());
     }
 }
Beispiel #20
0
        public Boolean GuardarDB(List <prod_GestionProductivaLaminado_x_paradas_CusTalme_Info> LST, ref string mensaje)
        {
            try
            {
                int c = 1;
                foreach (var item in LST)
                {
                    using (EntitiesProduccion Context = new EntitiesProduccion())
                    {
                        var Address = new prod_GestionProductivaLaminado_x_paradas_CusTalme();
                        Address.causa               = item.causa;
                        Address.Descripcion         = item.Descripcion;
                        Address.HoraFin             = item.HoraFin;
                        Address.HoraIni             = item.HoraIni;
                        Address.IdEmpresa           = item.IdEmpresa;
                        Address.IdGestionProductiva = item.IdGestionProductiva;
                        Address.IdTipoParada        = item.IdTipoParada;
                        Address.Secuencia           = c;
                        c++;

                        Context.prod_GestionProductivaLaminado_x_paradas_CusTalme.Add(Address);
                        Context.SaveChanges();
                        Context.Dispose();
                    }
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
        public Boolean AnularDB(int IdEmpresa, decimal Id)
        {
            try
            {
                using (EntitiesProduccion oEnt = new EntitiesProduccion())
                {
                    var Contact = oEnt.prod_GestionProductivaLaminado_CusTalme.First(var => var.IdEmpresa == IdEmpresa && var.IdGestionProductiva == Id);
                    Contact.Estado = "I";
                    oEnt.SaveChanges();
                }


                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.InnerException + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.InnerException.ToString());
            }
        }
        public Boolean GuardarDB(ref prod_ProgramaProd_Info Info)
        {
            try
            {
                List <prod_ProgramaProd_Info> Lst = new List <prod_ProgramaProd_Info>();
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    var Address = new prod_ProgramaProd();

                    Address.IdEmpresa   = Info.IdEmpresa;
                    Info.IdProgramaProd = Address.IdProgramaProd = getId(Info.IdEmpresa, Info.IdProgramaProd);
                    Address.IdTurno     = Info.IdTurno;
                    Address.Fecha       = Info.Fecha;
                    Address.IdProducto  = Info.IdProducto;
                    Address.IdCategoria = Info.IdCategoria;
                    Address.Unidad      = Info.Unidad;
                    Address.Peso        = Info.Peso;
                    Address.Toneladas   = Info.Toneladas;
                    Address.Pedidos     = Info.Pedidos;
                    Address.Estado      = "A";

                    Context.prod_ProgramaProd.Add(Address);
                    Context.SaveChanges();
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
Beispiel #23
0
        public Boolean GuardarDB(prod_GestionProductivaAcero_CusTalme_Info Info, ref Decimal IdGestion, ref string Mensaje)
        {
            try
            {
                List <prod_GestionProductivaAcero_CusTalme_Info> Lst = new List <prod_GestionProductivaAcero_CusTalme_Info>();
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    var Address = new prod_GestionProductivaAcero_CusTalme();

                    Address.IdEmpresa                  = Info.IdEmpresa;
                    Address.IdSucursal                 = Info.IdSucursal;
                    Address.IdGestionAceria            = IdGestion = GetId(Info.IdEmpresa);
                    Address.Fecha                      = Info.Fecha;
                    Address.IdHorno                    = Info.IdHorno;
                    Address.IdColada                   = Info.IdColada;
                    Address.chat_En_Horno              = Info.chat_En_Horno;
                    Address.chat_Cargada               = Info.chat_Cargada;
                    Address.Vaci_TempC                 = Info.Vaci_TempC;
                    Address.Vaci_acero                 = Info.Vaci_acero;
                    Address.EnHor_Acero                = Info.EnHor_Acero;
                    Address.EnHor_Perdida              = Info.EnHor_Perdida;
                    Address.Comps_C                    = Info.Comps_C;
                    Address.Comps_Si                   = Info.Comps_Si;
                    Address.Comps_Mn                   = Info.Comps_Mn;
                    Address.Comps_P                    = Info.Comps_P;
                    Address.Comps_S                    = Info.Comps_S;
                    Address.Comps_SAE                  = Info.Comps_SAE;
                    Address.AdiMet_Carburante          = Info.AdiMet_Carburante;
                    Address.AdiMet_Cal                 = Info.AdiMet_Cal;
                    Address.AdiMet_Desercoriante       = Info.AdiMet_Desercoriante;
                    Address.Tiem_Encendido             = Info.Tiem_Encendido;
                    Address.Tiem_Apagado               = Info.Tiem_Apagado;
                    Address.Tiem_Fundicion             = Info.Tiem_Fundicion;
                    Address.Tiem_Vaciado               = Info.Tiem_Vaciado;
                    Address.Tiem_Total                 = Info.Tiem_Total;
                    Address.Ener_Ea                    = Info.Ener_Ea;
                    Address.Ener_Er                    = Info.Ener_Er;
                    Address.Ener_Total                 = Info.Ener_Total;
                    Address.Ferroa_FeSi                = Info.Ferroa_FeSi;
                    Address.Ferroa_FeMn                = Info.Ferroa_FeMn;
                    Address.IndiHor_Rendimiento        = Info.IndiHor_Rendimiento;
                    Address.IndiHor_Productividad      = Info.IndiHor_Productividad;
                    Address.Tundish                    = Info.Tundish;
                    Address.InicioCC                   = Info.InicioCC;
                    Address.FinCC                      = Info.FinCC;
                    Address.Tiempo                     = Info.Tiempo;
                    Address.AceroCldo                  = Info.AceroCldo;
                    Address.Palanquilla                = Info.Palanquilla;
                    Address.Marrano                    = Info.Marrano;
                    Address.Escoria                    = Info.Escoria;
                    Address.PerdidaCC                  = Info.PerdidaCC;
                    Address.RendtCC                    = Info.RendtCC;
                    Address.ProductivCC                = Info.ProductivCC;
                    Address.IdProducto_TipoPalanquilla = Info.IdProducto_TipoPalanquilla;
                    Address.Unidades                   = Info.Unidades;
                    Address.Longitud                   = Info.Longitud;
                    Address.PesoUnitario               = Info.PesoUnitario;
                    Address.PesoMetro                  = Info.PesoMetro;
                    Address.Perdida                    = Info.Perdida;
                    Address.ProdRend                   = Info.ProdRend;
                    Address.ProdProduct                = Info.ProdProduct;
                    Address.Observacion                = Info.Observacion;
                    Address.IdUsuario                  = Info.IdUsuario;
                    Address.Fecha_Transaccion          = Info.Fecha_Transaccion;
                    Address.IdUsuarioUltModi           = Info.IdUsuarioUltModi;
                    Address.Fecha_UltMod               = Info.Fecha_UltMod;
                    Address.nom_pc                     = Info.nom_pc;
                    Address.ip         = Info.ip;
                    Address.Estado     = "A";
                    Address.Termopares = Info.Termopares;
                    Address.FeSiMn     = Info.FeSiMn;
                    Context.prod_GestionProductivaAcero_CusTalme.Add(Address);
                    Context.SaveChanges();
                    Mensaje = "Se A Procedido A guardar Con exito el Registro #" + Address.IdGestionAceria;
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString().ToString());
            }
        }
        public Boolean GuardarDB(List <prod_GestionProductivaTechos_CusTalme_Detalle_Info> Lista)
        {
            try
            {
                int c = 1;
                foreach (var Info in Lista)
                {
                    using (EntitiesProduccion Context = new EntitiesProduccion())
                    {
                        var Address = new prod_GestionProductivaTechos_CusTalme_Detalle();

                        Address.IdEmpresa           = Info.IdEmpresa;
                        Address.IdGestionProductiva = Info.IdGestionProductiva;
                        Address.Secuencia           = c;
                        c++;
                        Address.Prod_IdProducto = Info.Prod_IdProducto;
                        Address.Prod_Largo      = Info.Prod_Largo;
                        Address.Prod_Ancho      = Info.Prod_Ancho;
                        Address.Prod_PsoEsp     = Info.Prod_PsoEsp;
                        Address.Prod_Espesor    = Info.Prod_Espesor;
                        Address.Prod_PsoUnd     = Info.Prod_PsoUnd;
                        Address.Prducc_Unidades = Info.Prducc_Unidades;
                        Address.Prducc_Kg       = Info.Prducc_Kg;
                        if (Info.Segunda_IdProducto == 0)
                        {
                            Address.Segunda_IdProducto = null;
                        }
                        else
                        {
                            Address.Segunda_IdProducto = Info.Segunda_IdProducto;
                        }
                        Address.Segunda_Unidades = Info.Segunda_Unidades;
                        Address.Segunda_Kg       = Info.Segunda_Kg;
                        Address.Chatarra_Kg      = Info.Chatarra_Kg;
                        Address.Peso             = Info.Peso;
                        Address.Kg_Desp          = Info.Kg_Desp;
                        Address.Rend_Metalico    = Info.Rend_Metalico;
                        Address.KW = Info.KW;
                        Address.Tiempo_Preparacion    = Info.Tiempo_Preparacion;
                        Address.Tiempo_Produccion     = Info.Tiempo_Produccion;
                        Address.Tiempo_Total          = Info.Tiempo_Total;
                        Address.Parada_Mecanica       = Info.Parada_Mecanica;
                        Address.Parada_Electrico      = Info.Parada_Electrico;
                        Address.Parada_Logistica      = Info.Parada_Logistica;
                        Address.Parada_Otros          = Info.Parada_Otros;
                        Address.TotalParos            = Info.TotalParos;
                        Address.Indicadores_TnHrs     = Info.Indicadores_TnHrs;
                        Address.Indicadores_TimeParda = Info.Indicadores_TimeParda;
                        Address.Indicadores_UndsHrs   = Info.Indicadores_UndsHrs;
                        Address.Indicadores_Calidad   = Info.Indicadores_Calidad;

                        Context.prod_GestionProductivaTechos_CusTalme_Detalle.Add(Address);
                        Context.SaveChanges();
                    }
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.ToString() + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.ToString());
            }
        }
        public Boolean GuardarDB(prod_GestionProductivaLaminado_CusTalme_Info Info, ref decimal Id, ref string msj)
        {
            string Mes = "";

            try
            {
                List <prod_GestionProductivaLaminado_CusTalme_Info> Lst = new List <prod_GestionProductivaLaminado_CusTalme_Info>();
                using (EntitiesProduccion Context = new EntitiesProduccion())
                {
                    var Address = new prod_GestionProductivaLaminado_CusTalme();
                    Id = GetId(Info.IdEmpresa);
                    Address.IdEmpresa               = Info.IdEmpresa;
                    Address.IdGestionProductiva     = Id;
                    Address.IdTurno                 = Info.IdTurno;
                    Address.IdEmpleado_JefeTurno    = Info.IdEmpleado_JefeTurno;
                    Address.IdProducto_MateriaPrima = Info.IdProducto_MateriaPrima;
                    Address.Id_Bobina               = Info.Id_Bobina;
                    Address.Num_Orden               = Info.Num_Orden;
                    Address.kg_Cargados             = Info.kg_Cargados;
                    Address.kg_producidos           = Info.kg_producidos;
                    Address.IdProducto_Producido1   = Info.IdProducto_Producido1;
                    Address.unidades_prd_1          = Info.unidades_prd_1;
                    Address.pesokg_prd_1            = Info.pesokg_prd_1;
                    Address.IdProducto_Producido2   = Info.IdProducto_Producido2;
                    Address.unidades_prd_2          = Info.unidades_prd_2;
                    Address.pesokg_prd_2            = Info.pesokg_prd_2;
                    Address.kg_retazo_porcen        = Info.kg_retazo_porcen;
                    Address.kg_retazo_valor         = Info.kg_retazo_valor;
                    Address.kg_chatarra_porcen      = Info.kg_chatarra_porcen;
                    Address.kg_chatarra_valor       = Info.kg_chatarra_valor;
                    Address.kg_oxidacion_porcen     = Info.kg_oxidacion_porcen;
                    Address.kg_oxidacion_valor      = Info.kg_oxidacion_valor;
                    Address.rendi_metal_historico   = Info.rendi_metal_historico;
                    Address.rendi_metal_real        = Info.rendi_metal_real;
                    Address.rendi_metal_Diferencia  = Info.rendi_metal_Diferencia;
                    Address.consumo_kilowatios      = Info.consumo_kilowatios;
                    Address.consumo_galones         = Info.consumo_galones;
                    Address.cambio_prue_programado  = Info.cambio_prue_programado;
                    Address.cambio_prue_real        = Info.cambio_prue_real;
                    Address.cambio_prue_porcentaje  = Info.cambio_prue_porcentaje;
                    Address.hora_turno_ini          = Info.hora_turno_ini;
                    Address.hora_turno_fin          = Info.hora_turno_fin;
                    Address.hora_jornada            = Info.hora_jornada;
                    Address.hora_productiva         = Info.hora_productiva;
                    Address.hora_Paros              = Info.hora_Paros;
                    Address.hora_Neta               = Info.hora_Neta;
                    Address.hora_Hrs_Maquina        = Info.hora_Hrs_Maquina;
                    Address.Ton_Programada          = Info.Ton_Programada;
                    Address.Ton_real                = Info.Ton_real;
                    Address.Ton_Eficiencia          = Info.Ton_Eficiencia;
                    Address.Ton_TnHrNeta            = Info.Ton_TnHrNeta;
                    Address.Ton_kwTon               = Info.Ton_kwTon;
                    Address.Ton_GlsTon              = Info.Ton_GlsTon;
                    Address.EficienciaProduccion    = Info.EficienciaProduccion;
                    Address.Estado = "A";
                    Address.Fecha  = Info.Fecha;

                    Context.prod_GestionProductivaLaminado_CusTalme.Add(Address);
                    Context.SaveChanges();
                    msj = "Guardado Exitosamente Le Gestion #" + Id;
                    decimal id = Id;
                    Info.ListDetalle.ForEach(Var =>
                    {
                        Var.IdEmpresa = Info.IdEmpresa; Var.IdGestionProductiva = id;
                    });
                    if (oData.GuardarDB(Info.ListDetalle, ref Mes))
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                mensaje = ex.InnerException + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.InnerException.ToString());
            }
        }