Ejemplo n.º 1
0
        public BaumaxStoreDaysManager(long countryid, DateTime fromDate, DateTime toDate)
        {
            FromDate = DateTimeSql.CheckSmallMinMax(fromDate);
            ToDate   = DateTimeSql.CheckSmallMinMax(toDate);

            LoadCountry(countryid);
        }
Ejemplo n.º 2
0
        // return all relation of employees where Employee.MainStoreID=storeid and found into begin and end date-range
        // need for absence planning
        public List <EmployeeRelation> GetEmployeeRelationByMainStore(long storeid, DateTime begin, DateTime end)
        {
            Debug.Assert(storeid > 0);
            Debug.Assert(DateTimeHelper.Between(begin, DateTimeSql.SmallDatetimeMin, DateTimeSql.SmallDatetimeMax));
            Debug.Assert(DateTimeHelper.Between(end, DateTimeSql.SmallDatetimeMin, DateTimeSql.SmallDatetimeMax));

            begin = DateTimeSql.CheckSmallMinMax(begin);
            end   = DateTimeSql.CheckSmallMinMax(end);


            string template_hql = @"select relation from EmployeeRelation relation, Employee empl where
                            empl.MainStoreID={0} and empl.id=relation.EmployeeID
                            and NOT((relation.BeginTime>'{2}') OR (relation.EndTime<'{1}')) 
                             order by relation.EmployeeID asc, relation.BeginTime asc";

            string hql = string.Format(template_hql, storeid, DateTimeSql.DateToSqlString(begin), DateTimeSql.DateToSqlString(end));

            IList list = HibernateTemplate.FindByNamedParam(hql, new string[] { }, new object[] { });

            if (list == null || list.Count == 0)
            {
                return(null);
            }

            return(GetTypedListFromIList(list));
        }
Ejemplo n.º 3
0
        public CountryCloseDaysListEx(long countryid, DateTime from, DateTime to)
        {
            CountryId = countryid;
            FromDate  = DateTimeSql.CheckSmallMinMax(from);
            ToDate    = DateTimeSql.CheckSmallMinMax(to);

            DoLoad(CountryId, FromDate, ToDate);
        }
Ejemplo n.º 4
0
        protected void DoLoad(long countryid, DateTime from, DateTime to)
        {
            if (CountryId <= 0)
            {
                return;
            }

            DateTime from1 = DateTimeSql.CheckSmallMinMax(from);
            DateTime to1   = DateTimeSql.CheckSmallMinMax(to);

            BuildDiction(Service.GetYearlyWorkingDaysFiltered(countryid, from1, to1));
        }
Ejemplo n.º 5
0
 public BaumaxCloseDays(DateTime from)
 {
     FromDate = DateTimeSql.CheckSmallMinMax(from);
 }
Ejemplo n.º 6
0
 public BaumaxStoreDaysManager(DateTime fromDate, DateTime toDate)
 {
     FromDate = DateTimeSql.CheckSmallMinMax(fromDate);
     ToDate   = DateTimeSql.CheckSmallMinMax(toDate);
 }
Ejemplo n.º 7
0
 public BaumaxFeasts(DateTime from)
 {
     FromDate = DateTimeSql.CheckSmallMinMax(from);
 }