Beispiel #1
0
 public bool Insertar(ref BE.Planilla bePlanilla)
 {
     try
     {
         return(new DA.Planilla().Insertar(ref bePlanilla));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #2
0
        private void CalcularPlanillaResumen()
        {
            try
            {
                var lnPlanilla = new LN.Planilla(this.anho, this.mes);

                BE.Planilla objPlanilla = lnPlanilla.Obtener();
                if (objPlanilla == null)
                {
                    return;
                }

                this.idPlanilla   = objPlanilla.ID;
                this.txtAnho.Text = objPlanilla.Anho.ToString();
                string nombreMes = Util.GetNameOfMonth(objPlanilla.Mes);
                this.txtMes.Text                    = nombreMes;
                this.txtDias.Text                   = objPlanilla.Dias.ToString();
                this.txtSueldoMinimo.Text           = objPlanilla.SueldoMinimo.ToString("N2");
                this.txtAsignacionFamiliar.Text     = objPlanilla.AsignacionFamiliar.ToString("N2") + "%";
                this.txtEsSalud.Text                = objPlanilla.EsSalud.ToString("N2") + "%";
                this.txtPrimerasHorasExtras.Text    = objPlanilla.PrimerasDosHorasExtras.ToString("N2") + "%";
                this.txtPosterioresHorasExtras.Text = objPlanilla.PosterioresDosHorasExtras.ToString("N2") + "%";
                this.txtHorarioNocturno.Text        = objPlanilla.Nocturno.ToString("N2") + "%";


                int    cantidadEmpleados = 0;
                double totalSueldos      = 0.0;
                double totalPagos        = 0.0;
                double totalEssalud      = 0.0;
                double totalSnp          = 0.0;
                double totalAfp          = 0.0;

                lnPlanilla.Resumen(out cantidadEmpleados,
                                   out totalSueldos,
                                   out totalPagos,
                                   out totalEssalud,
                                   out totalSnp,
                                   out totalAfp);

                this.txtCantidadEmpleados.Text = cantidadEmpleados.ToString();
                this.txtTotalSueldos.Text      = totalSueldos.ToString("N2");
                this.txtTotalPagos.Text        = totalPagos.ToString("N2");
                this.txtTotalEssalud.Text      = totalEssalud.ToString("N2");
                this.txtTotalOnp.Text          = totalSnp.ToString("N2");
                this.txtTotalAfp.Text          = totalAfp.ToString("N2");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #3
0
        public BE.Planilla Obtener()
        {
            BE.Planilla bePlanilla = null;
            try
            {
                var daPlanilla = new DA.Planilla();

                bePlanilla = daPlanilla.Obtener(this.anho, this.mes);

                //if (bePlanilla != null)
                //    bePlanilla.Detalles = daPlanilla.Detalle(bePlanilla.ID);

                return(bePlanilla);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }