Exemplo n.º 1
0
        public in_transferencia_x_fa_guia_remision_Info Get_Info_transferencia_x_fa_guia_remision(int IdEmpresa, int IdSucursalOrigen, int IdBodegaOrigen, decimal IdTransferencia)
        {
            EntitiesInventario oEnti = new EntitiesInventario();

            try
            {
                in_transferencia_x_fa_guia_remision_Info Info = new in_transferencia_x_fa_guia_remision_Info();
                var Objeto = oEnti.in_transferencia_x_fa_guia_remision.FirstOrDefault(var => var.IdEmpresa == IdEmpresa && var.IdSucursalOrigen == IdSucursalOrigen && var.IdBodegaOrigen == IdBodegaOrigen && var.IdTransferencia == IdTransferencia);
                if (Objeto != null)
                {
                    Info.IdEmpresa        = Objeto.IdEmpresa;
                    Info.IdSucursalOrigen = Objeto.IdSucursalOrigen;
                    Info.IdBodegaOrigen   = Objeto.IdBodegaOrigen;
                    Info.IdTransferencia  = Objeto.IdTransferencia;
                    Info.IdEmpresa_Guia   = Objeto.IdEmpresa_Guia;
                    Info.IdSucursal_Guia  = Objeto.IdSucursal_Guia;
                    Info.IdBodega_Guia    = Objeto.IdBodega_Guia;
                    Info.IdGuiaRemision   = Objeto.IdGuiaRemision;

                    Info.Obser = Objeto.Obser;
                }
                return(Info);
            }
            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;
                Console.WriteLine("Error :" + ex.Message);
                throw new Exception(mensaje);
            }
        }
Exemplo n.º 2
0
        public Boolean GuardarDB(in_transferencia_x_fa_guia_remision_Info Info)
        {
            try
            {
                List <in_transferencia_x_fa_guia_remision_Info> Lst = new List <in_transferencia_x_fa_guia_remision_Info>();
                using (EntitiesInventario Context = new EntitiesInventario())
                {
                    var Address = new in_transferencia_x_fa_guia_remision();

                    Address.IdEmpresa        = Info.IdEmpresa;
                    Address.IdSucursalOrigen = Info.IdSucursalOrigen;
                    Address.IdBodegaOrigen   = Info.IdBodegaOrigen;
                    Address.IdTransferencia  = Info.IdTransferencia;
                    Address.IdEmpresa_Guia   = Info.IdEmpresa_Guia;
                    Address.IdSucursal_Guia  = Info.IdSucursal_Guia;
                    Address.IdBodega_Guia    = Info.IdBodega_Guia;
                    Address.IdGuiaRemision   = Info.IdGuiaRemision;
                    Address.Obser            = Info.Obser;

                    Context.in_transferencia_x_fa_guia_remision.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);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString() + " " + ex.Message;
                throw new Exception(mensaje);
            }
        }
Exemplo n.º 3
0
 public Boolean GuardarDB(in_transferencia_x_fa_guia_remision_Info Info)
 {
     try
     {
     }
     catch (Exception ex)
     {
         Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
         throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "GuardarDB", ex.Message), ex)
               {
                   EntityType = typeof(in_transferencia_x_fa_guia_remision_Bus)
               };
     }
     return(Data.GuardarDB(Info));
 }