Example #1
0
        public List <cp_reembolso_Info> Get_List_reembolso(int IdEmpresa)
        {
            try
            {
                List <cp_reembolso_Info> Lst   = new List <cp_reembolso_Info>();
                EntitiesCuentasxPagar    oEnti = new EntitiesCuentasxPagar();
                var Query = from q in oEnti.cp_reembolso
                            where q.IdEmpresa == IdEmpresa
                            select q;
                foreach (var item in Query)
                {
                    cp_reembolso_Info Obj = new cp_reembolso_Info();
                    Obj.IdEmpresa               = item.IdEmpresa;
                    Obj.IdCbteCble_Ogiro        = item.IdCbteCble_Ogiro;
                    Obj.IdTipoCbte_Ogiro        = item.IdTipoCbte_Ogiro;
                    Obj.IdReembolso             = item.IdReembolso;
                    Obj.IdProveedor             = item.IdProveedor;
                    Obj.TipoIdProveedor         = item.TipoIdProveedor;
                    Obj.IdentificacionProveedor = item.IdentificacionProveedor;
                    Obj.TipoDoc_CodSRI          = item.TipoDoc_CodSRI;
                    Obj.Establecimiento         = item.Establecimiento;
                    Obj.Punto_Emision           = item.Punto_Emision;
                    Obj.Secuencial              = item.Secuencial;
                    Obj.Autorizacion            = item.Autorizacion;
                    Obj.Fecha_Emision           = item.Fecha_Emision;
                    Obj.TarifaIVAcero           = item.TarifaIVAcero;
                    Obj.TarifaIVADiferentecero  = item.TarifaIVADiferentecero;
                    Obj.TarifaNoObjetoIVA       = item.TarifaNoObjetoIVA;
                    Obj.MontoICE = item.MontoICE;
                    Obj.MontoIVA = item.MontoIVA;

                    Obj.baseImponible = item.baseImponible;
                    Obj.Total         = item.Total;


                    Lst.Add(Obj);
                }
                return(Lst);
            }
            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.InnerException + " " + ex.Message;
                throw new Exception(ex.InnerException.ToString());
            }
        }
Example #2
0
 public Boolean GuardarDB(cp_reembolso_Info Info)
 {
     try
     {
         return(data.GuardarDB(Info));
     }
     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(cp_reembolso_Bus)
               };
     }
 }
Example #3
0
        public Boolean GuardarDB(cp_reembolso_Info Info)
        {
            try
            {
                List <cp_reembolso_Info> Lst = new List <cp_reembolso_Info>();
                using (EntitiesCuentasxPagar Context = new EntitiesCuentasxPagar())
                {
                    var Address = new cp_reembolso();

                    Address.IdEmpresa               = Info.IdEmpresa;
                    Address.IdCbteCble_Ogiro        = Info.IdCbteCble_Ogiro;
                    Address.IdTipoCbte_Ogiro        = Info.IdTipoCbte_Ogiro;
                    Address.IdReembolso             = GetId(Info.IdEmpresa);
                    Address.IdProveedor             = Info.IdProveedor;
                    Address.TipoIdProveedor         = Info.TipoIdProveedor;
                    Address.IdentificacionProveedor = Info.IdentificacionProveedor;
                    Address.TipoDoc_CodSRI          = Info.TipoDoc_CodSRI;
                    Address.Establecimiento         = Info.Establecimiento;
                    Address.Punto_Emision           = Info.Punto_Emision;
                    Address.Secuencial              = Info.Secuencial;
                    Address.Autorizacion            = Info.Autorizacion;
                    Address.Fecha_Emision           = Info.Fecha_Emision;
                    Address.TarifaIVAcero           = Info.TarifaIVAcero;
                    Address.TarifaIVADiferentecero  = Info.TarifaIVADiferentecero;
                    Address.TarifaNoObjetoIVA       = Info.TarifaNoObjetoIVA;
                    Address.MontoICE = Info.MontoICE;
                    Address.MontoIVA = Info.MontoIVA;

                    Address.baseImponible = Info.baseImponible;
                    Address.Total         = Info.Total;

                    //contact = Address;
                    Context.cp_reembolso.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.InnerException + " " + ex.Message;
                throw new Exception(ex.InnerException.ToString());
            }
        }