public BaumaxStoreDaysManager(long countryid, DateTime fromDate, DateTime toDate) { FromDate = DateTimeSql.CheckSmallMinMax(fromDate); ToDate = DateTimeSql.CheckSmallMinMax(toDate); LoadCountry(countryid); }
// 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)); }
public CountryCloseDaysListEx(long countryid, DateTime from, DateTime to) { CountryId = countryid; FromDate = DateTimeSql.CheckSmallMinMax(from); ToDate = DateTimeSql.CheckSmallMinMax(to); DoLoad(CountryId, FromDate, ToDate); }
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)); }
public BaumaxCloseDays(DateTime from) { FromDate = DateTimeSql.CheckSmallMinMax(from); }
public BaumaxStoreDaysManager(DateTime fromDate, DateTime toDate) { FromDate = DateTimeSql.CheckSmallMinMax(fromDate); ToDate = DateTimeSql.CheckSmallMinMax(toDate); }
public BaumaxFeasts(DateTime from) { FromDate = DateTimeSql.CheckSmallMinMax(from); }