Ejemplo n.º 1
0
 public static void InsertVDDetalle(EstadoDDJJ periodo, int VDInspectorId)
 {
     using (var context = new lts_sindicatoDataContext())
     {
         VD_Detalle VDDetalle = new VD_Detalle
         {
             VDInspectorId        = VDInspectorId,
             Periodo              = periodo.Periodo,
             Rectificacion        = periodo.Rectificacion,
             CantidadEmpleados    = periodo.Empleados,
             CantidadSocios       = periodo.Socios,
             TotalSueldoEmpleados = periodo.TotalSueldoEmpleados,
             TotalSueldoSocios    = periodo.TotalSueldoSocios,
             TotalAporteEmpleados = periodo.AporteLey,
             TotalAporteSocios    = periodo.AporteSocio,
             FechaDePago          = periodo.FechaDePago,
             ImporteDepositado    = periodo.ImporteDepositado,
             DiasDeMora           = periodo.DiasDeMora,
             DeudaGenerada        = periodo.Capital,
             InteresGenerado      = periodo.Interes,
             Total        = periodo.Total,
             PerNoDec     = periodo.PerNoDec,
             ActaId       = 0,
             NumeroDeActa = 0,
             Estado       = 0
         };
         context.VD_Detalle.InsertOnSubmit(VDDetalle);
         context.SubmitChanges();
     }
 }
Ejemplo n.º 2
0
        public static List <EstadoDDJJ> GenerarPerNoDec(DateTime Desde, DateTime Hasta, string cuit)
        {
            List <EstadoDDJJ> Periodos = new List <EstadoDDJJ>();
            DateTime          periodo  = Desde; // Convert.ToDateTime("01/" + msk_Desde.Text);
            DateTime          hasta    = Hasta; // Convert.ToDateTime("01/" + msk_Hasta.Text);

            while (periodo <= hasta)
            {
                if (_ddjj.Where(x => x.Periodo == periodo).Count() == 0)
                {
                    EstadoDDJJ PerNoDec = new EstadoDDJJ();
                    PerNoDec.Periodo           = periodo;
                    PerNoDec.Rectificacion     = 0;
                    PerNoDec.AporteLey         = 0;
                    PerNoDec.AporteSocio       = 0;
                    PerNoDec.FechaDePago       = null;
                    PerNoDec.ImporteDepositado = 0;
                    PerNoDec.Empleados         = 0;
                    PerNoDec.Socios            = 0;
                    PerNoDec.Capital           = 0;
                    PerNoDec.Interes           = 0;
                    PerNoDec.Total             = 0;
                    PerNoDec.Acta       = GetNroDeActa(periodo, cuit);
                    PerNoDec.VerifDeuda = GetNroVerifDeuda(cuit, periodo, 0, false, null);
                    PerNoDec.PerNoDec   = 1;
                    Periodos.Add(PerNoDec);
                }
                periodo = periodo.AddMonths(1);
            }
            return(Periodos);
        }
Ejemplo n.º 3
0
 public static void UpdateVDDetalle(EstadoDDJJ ObjPeriodo, int VD_CabeceraId, DateTime Periodo, int Rectificacion, DateTime FechaDePago)
 {
     using (var context = new lts_sindicatoDataContext())
     {
         var PeriodoDeVDDetalle = context.VD_Detalle.Where(x => x.VDInspectorId == VD_CabeceraId && x.Periodo == Periodo && x.Rectificacion == Rectificacion && x.FechaDePago == FechaDePago).Single();
         if (PeriodoDeVDDetalle != null)
         {
             PeriodoDeVDDetalle.CantidadEmpleados    = ObjPeriodo.Empleados;
             PeriodoDeVDDetalle.CantidadSocios       = ObjPeriodo.Socios;
             PeriodoDeVDDetalle.TotalSueldoEmpleados = ObjPeriodo.TotalSueldoEmpleados;
             PeriodoDeVDDetalle.TotalSueldoSocios    = ObjPeriodo.TotalSueldoSocios;
             PeriodoDeVDDetalle.TotalAporteEmpleados = ObjPeriodo.AporteLey;
             PeriodoDeVDDetalle.TotalAporteSocios    = ObjPeriodo.AporteSocio;
             PeriodoDeVDDetalle.FechaDePago          = Convert.ToDateTime(ObjPeriodo.FechaDePago);
             PeriodoDeVDDetalle.ImporteDepositado    = ObjPeriodo.ImporteDepositado;
             PeriodoDeVDDetalle.DiasDeMora           = ObjPeriodo.DiasDeMora;
             PeriodoDeVDDetalle.DeudaGenerada        = ObjPeriodo.Capital;
             PeriodoDeVDDetalle.InteresGenerado      = ObjPeriodo.Interes;
             PeriodoDeVDDetalle.Total    = ObjPeriodo.Total;
             PeriodoDeVDDetalle.PerNoDec = ObjPeriodo.PerNoDec;
             context.SubmitChanges();
         }
     }
 }