Beispiel #1
0
        public static bool ToBoolYN(this string yn, bool defaultValue)
        {
            if (LcdHelper.IsEmptyID(yn))
            {
                return(defaultValue);
            }

            if (string.Equals(LcdHelper.Trim(yn), "Y", StringComparison.CurrentCultureIgnoreCase))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        public static DateTime GetRptDate_1Hour(DateTime t)
        {
            //1시간 단위
            int baseHours = 1;

            //DayStartTime 기준
            int baseMinute = ShopCalendar.StartTimeOfDayT(ModelContext.Current.StartTime).Minute;

            //ex) HH:30:00
            DateTime rptDate = LcdHelper.Trim(t, "HH").AddMinutes(baseMinute);

            //baseMinute(ex.30분) 이상인 경우 이후 시간대 baseMinute의 실적
            //07:30 = 06:30(초과) ~ 07:30(이하)인경우, 06:40 --> 07:30, 07:30 --> 07:30, 07:40 --> 08:30
            if (t.Minute > baseMinute)
            {
                rptDate = rptDate.AddHours(baseHours);
            }

            return(rptDate);
        }