Exemplo n.º 1
0
        public long[] GetInUseIDList(InUseEntity inUseEntity, long countryID)
        {
            string spName;

            switch (inUseEntity)
            {
            case InUseEntity.Absence:
                spName = "spAbsenceUsingIDList";
                break;

            case InUseEntity.AvgWorkingDaysInWeek:
                spName = "spAvgWorkingDaysInWeekUsingIDList";
                break;

            case InUseEntity.WorkingModel:
                spName = "spWorkingModelUsingIDList";
                break;

            default:
                goto case InUseEntity.Absence;
            }
            string      query  = string.Format("exec {0} {1}", spName, countryID);
            List <long> result = new List <long>();

            HibernateTemplate.Execute(
                delegate(ISession session)
            {
                session.CreateSQLQuery(query)
                .AddScalar("ID", NHibernateUtil.Int64)
                .List(result);
                return(null);
            }
                );
            return(result.ToArray());
        }
Exemplo n.º 2
0
 public long[] GetInUseIDList(InUseEntity inUseEntity, long countryID)
 {
     try
     {
         return(CountryDao.GetInUseIDList(inUseEntity, countryID));
     }
     catch (Exception ex)
     {
         throw new LoadException(ex);
     }
 }
Exemplo n.º 3
0
 public long[] GetInUseIDList(InUseEntity inUseEntity, long countryID)
 {
     return(RemoteService.GetInUseIDList(inUseEntity, countryID));
 }