示例#1
0
        private WorkStationInfo GetWorkstationID()
        {
            LDB_SysParaSettingsBll ssb = new LDB_SysParaSettingsBll(LDB_AppSettings.Current.LDBConnect);

            LDB_ParkingDataBuffer.Current = ssb.GetOrCreateSetting <LDB_ParkingDataBuffer>();

            WorkStationInfo ws            = null;
            string          workstationID = AppSettings.CurrentSetting.WorkstationID;

            if (!string.IsNullOrEmpty(workstationID))
            {
                ws = LDB_ParkingDataBuffer.Current.WorkStations.FirstOrDefault(w => w.StationID == workstationID);
            }
            return(ws);
        }
示例#2
0
        private void InitSystemParameters()
        {
            //初始化系统设置
            LDB_SysParaSettingsBll ssb = new LDB_SysParaSettingsBll(LDB_AppSettings.Current.LDBConnect);

            UserSetting.Current           = ssb.GetOrCreateSetting <UserSetting>();
            HolidaySetting.Current        = ssb.GetOrCreateSetting <HolidaySetting>();
            AccessSetting.Current         = ssb.GetOrCreateSetting <AccessSetting>();
            TariffSetting.Current         = ssb.GetOrCreateSetting <TariffSetting>();
            CarTypeSetting.Current        = ssb.GetOrCreateSetting <CarTypeSetting>();
            CustomCardTypeSetting.Current = ssb.GetOrCreateSetting <CustomCardTypeSetting>();
            KeySetting.Current            = ssb.GetOrCreateSetting <KeySetting>();

            GlobalVariables.SetCardReaderKeysetting();
        }
示例#3
0
        private void InitSystemParameters()
        {
            //初始化系统设置
            LDB_SysParaSettingsBll ssb = new LDB_SysParaSettingsBll(LDB_AppSettings.Current.LDBConnect);

            UserSetting.Current           = ssb.GetOrCreateSetting <UserSetting>();
            HolidaySetting.Current        = ssb.GetOrCreateSetting <HolidaySetting>();
            AccessSetting.Current         = ssb.GetOrCreateSetting <AccessSetting>();
            TariffSetting.Current         = ssb.GetOrCreateSetting <TariffSetting>();
            CarTypeSetting.Current        = ssb.GetOrCreateSetting <CarTypeSetting>();
            CustomCardTypeSetting.Current = ssb.GetOrCreateSetting <CustomCardTypeSetting>();
            KeySetting.Current            = ssb.GetOrCreateSetting <KeySetting>();

            //添加读卡器读取扇区2和密钥
            CardReaderManager.GetInstance(UserSetting.Current.WegenType).AddReadSectionAndKey(GlobalVariables.ParkingSection, GlobalVariables.ParkingKey);
        }