예제 #1
0
        public double Get_Valor_vacaciones(int IdEmpresa, int IdNomina_tipo, int IdEmpleado, DateTime Fecha_Inicio, DateTime Fecha_Fin, string IdRubro)
        {
            try
            {
                double Valor = 0;

                using (EntitiesRoles db = new EntitiesRoles())
                {
                    var select = from C in db.spROL_Valor_Ganado_Vacaciones(IdEmpresa, IdNomina_tipo, IdEmpleado, Fecha_Inicio, Fecha_Fin, IdRubro)
                                 select C;

                    foreach (var item in select)
                    {
                        Valor = Convert.ToDouble(item.Valor);
                    }
                }
                return(Valor);
            }
            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);
                mensaje = ex.InnerException + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                throw new Exception(ex.InnerException.ToString());
            }
        }