Ejemplo n.º 1
0
 private void SetValue(POS.Model.MySetting mysetting, HolidaySetting hs)
 {
     mysetting.SundayIsRest   = hs.SundayIsRest;
     mysetting.SaturdayIsRest = hs.SaturdayIsRest;
     if (hs.Holidays != null && hs.Holidays.Count > 0)
     {
         foreach (HolidayInfo h in hs.Holidays)
         {
             if (mysetting.Holidays == null)
             {
                 mysetting.Holidays = new List <POS.Model.HolidayInfo>();
             }
             POS.Model.HolidayInfo holiday = new POS.Model.HolidayInfo();
             holiday.StartDate = h.StartDate;
             holiday.EndDate   = h.EndDate;
             if (h.WeekenToWorkDayInterval != null && h.WeekenToWorkDayInterval.Count > 0)
             {
                 foreach (DatetimeInterval di in h.WeekenToWorkDayInterval)
                 {
                     if (holiday.WeekenToWorkDayInterval == null)
                     {
                         holiday.WeekenToWorkDayInterval = new List <Ralid.Park.POS.Model.DatetimeInterval>();
                     }
                     holiday.WeekenToWorkDayInterval.Add(new Ralid.Park.POS.Model.DatetimeInterval()
                     {
                         Begin = di.Begin,
                         End   = di.End
                     });
                 }
             }
             mysetting.Holidays.Add(holiday);
         }
     }
 }
Ejemplo n.º 2
0
 private void SetValue(POS.Model.MySetting mysetting, List <OperatorInfo> opts)
 {
     mysetting.Operators = (from opt in opts
                            orderby opt.OperatorName ascending
                            select new POS.Model.OperatorInfo()
     {
         OperatorID = opt.OperatorID,
         OperatorName = opt.OperatorName,
         OperatorNum = opt.OperatorNum,
         Password = (new DTEncrypt()).Encrypt(opt.Password),
     }
                            ).ToList();
 }
Ejemplo n.º 3
0
 private void SetValue(POS.Model.MySetting mysetting, TariffSetting ts)
 {
     if (ts.TariffOption != null)
     {
         mysetting.FreeTimeAfterPay = ts.TariffOption.FreeTimeAfterPay;
     }
     if (ts.TariffArray != null && ts.TariffArray.Count > 0)
     {
         foreach (TariffBase tb in ts.TariffArray)
         {
             if (tb is TariffOfDixiakongjian)
             {
                 if (mysetting.TariffOfDixiakongjians == null)
                 {
                     mysetting.TariffOfDixiakongjians = new List <TariffOfDixiakongjian>();
                 }
                 mysetting.TariffOfDixiakongjians.Add(tb as TariffOfDixiakongjian);
             }
             else if (tb is TariffOfGuanZhou)
             {
                 if (mysetting.TariffOfGuanZhous == null)
                 {
                     mysetting.TariffOfGuanZhous = new List <TariffOfGuanZhou>();
                 }
                 mysetting.TariffOfGuanZhous.Add(tb as TariffOfGuanZhou);
             }
             else if (tb is TariffOfLimitation)
             {
                 if (mysetting.TariffOfLimitations == null)
                 {
                     mysetting.TariffOfLimitations = new List <TariffOfLimitation>();
                 }
                 mysetting.TariffOfLimitations.Add(tb as TariffOfLimitation);
             }
             else if (tb is TariffOfTurningLimited)
             {
                 if (mysetting.TariffOfTurningLimiteds == null)
                 {
                     mysetting.TariffOfTurningLimiteds = new List <TariffOfTurningLimited>();
                 }
                 mysetting.TariffOfTurningLimiteds.Add(tb as TariffOfTurningLimited);
             }
             else if (tb is TariffOfTurning)
             {
                 if (mysetting.TariffOfTurnings == null)
                 {
                     mysetting.TariffOfTurnings = new List <TariffOfTurning>();
                 }
                 mysetting.TariffOfTurnings.Add(tb as TariffOfTurning);
             }
             else if (tb is TariffPerDay)
             {
                 if (mysetting.TariffPerDays == null)
                 {
                     mysetting.TariffPerDays = new List <TariffPerDay>();
                 }
                 mysetting.TariffPerDays.Add(tb as TariffPerDay);
             }
             else if (tb is TariffPerTime)
             {
                 if (mysetting.TariffPerTimes == null)
                 {
                     mysetting.TariffPerTimes = new List <TariffPerTime>();
                 }
                 mysetting.TariffPerTimes.Add(tb as TariffPerTime);
             }
         }
     }
 }
Ejemplo n.º 4
0
 private void SetValue(POS.Model.MySetting mysetting, KeySetting ks)
 {
     mysetting.ParkingKey     = ks.ParkingKey;
     mysetting.ParkingSection = ks.ParkingSection;
 }
Ejemplo n.º 5
0
 private void SetValue(POS.Model.MySetting mysetting, UserSetting us)
 {
     mysetting.WegenType = (POS.Model.WegenType)us.WegenType;
 }