Exemple #1
0
        public bool GenerarRDEP(int IdEmpresa, int IdSucursal, int Id_Rdep, int IdAnio, int IdNomina_Tipo, decimal IdEmpleado, string Observacion, string IdUsuario)
        {
            int IdSucursalInicio = IdSucursal;
            int IdSucursalFin    = IdSucursal == 0 ? 9999 : IdSucursal;

            decimal IdEmpleadoInicio = IdEmpleado;
            decimal IdEmpleadoFin    = IdEmpleado == 0 ? 999999999 : IdEmpleado;

            if (Id_Rdep == 0)
            {
                Id_Rdep = get_id(IdEmpresa);
            }

            try
            {
                List <ro_rdep_Info> Lista = new List <ro_rdep_Info>();

                using (Entities_rrhh Context = new Entities_rrhh())
                {
                    Context.GenerarRDEP(IdEmpresa, Id_Rdep, IdAnio, IdNomina_Tipo, IdSucursalInicio, IdSucursalFin, IdEmpleadoInicio, IdEmpleadoFin, Observacion, IdUsuario);
                }

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }