private void InitSystemParameters() { //初始化系统设置 SysParaSettingsBll ssb = new SysParaSettingsBll(AppSettings.CurrentSetting.AvailableParkConnect); UserSetting.Current = ssb.GetOrCreateSetting <UserSetting>(); TariffSetting.Current = ssb.GetOrCreateSetting <TariffSetting>(); CustomCardTypeSetting.Current = ssb.GetOrCreateSetting <CustomCardTypeSetting>(); }
public ServiceHelper() { SysParaSettingsBll ssb = new SysParaSettingsBll(AppSettings.CurrentSetting.ParkConnect); AccessSetting.Current = ssb.GetOrCreateSetting <AccessSetting>(); TariffSetting.Current = ssb.GetOrCreateSetting <TariffSetting>(); UserSetting.Current = ssb.GetOrCreateSetting <UserSetting>(); HolidaySetting.Current = ssb.GetOrCreateSetting <HolidaySetting>(); CarTypeSetting.Current = ssb.GetOrCreateSetting <CarTypeSetting>(); CustomCardTypeSetting.Current = ssb.GetSetting <CustomCardTypeSetting>(); ParkBuffer.Current = new ParkBuffer(AppSettings.CurrentSetting.ParkConnect); ParkBuffer.Current.InValid(); }
private void FrmMain_Load(object sender, EventArgs e) { //ReadSoftDog(); DoLogIn(); UserSettings.Current = SysParaSettingsBll.GetOrCreateSetting <UserSettings>(AppSettings.Current.ConnStr); //mnu_Home.PerformClick(); }
private void FrmMain_Load(object sender, EventArgs e) { //ReadSoftDog(); DoLogIn(); UserSettings.Current = SysParaSettingsBll.GetOrCreateSetting <UserSettings>(AppSettings.Current.ConnStr); //启动同步时间服务 _DatetimeSyncService = new DatetimeSyncService(AppSettings.Current.ConnStr); _DatetimeSyncService.Start(); }
private void FrmMain_Load(object sender, EventArgs e) { this.Text += string.Format(" [{0}]", Application.ProductVersion); DoLogIn(); WXManager.Current = new WXManager(AppSettings.Current.ConnStr); WXManager.Current.Init(); UserSettings.Current = SysParaSettingsBll.GetOrCreateSetting<UserSettings>(AppSettings.Current.ConnStr); SelfHostServer.StartWebApiService(); }
private void InitSystemParameters() { AppSettings.CurrentSetting = new AppSettings(Application.StartupPath + @"\PreferentialSystem.exe.config"); SysParaSettingsBll ssb = new SysParaSettingsBll(AppSettings.CurrentSetting.AvailableParkConnect); UserSetting.Current = ssb.GetOrCreateSetting <UserSetting>(); PREWorkstationSetting.Current = ssb.GetOrCreateSetting <PREWorkstationSetting>(); PRESysOptionSetting.Current = ssb.GetOrCreateSetting <PRESysOptionSetting>(); //从本地获取当前工作站 string temp = AppSettings.CurrentSetting.GetConfigContent("CurrentWorkstationID"); Guid guidValue; if (Guid.TryParse(temp, out guidValue) && guidValue != null) { PRESysOptionSetting.Current.PRESysOption.CurrentWorkstationID = guidValue; temp = AppSettings.CurrentSetting.GetConfigContent("CurrentWorkstation"); PRESysOptionSetting.Current.PRESysOption.CurrentWorkstation = temp; } }
/// <summary> /// 通过权限组名称获取权限组ID,权限组名称为空时表示所有权限,返回0,没有找到的返回-1 /// </summary> /// <param name="name"></param> /// <returns></returns> private int GetAccessID(string name) { if (string.IsNullOrEmpty(name)) { return(0); } SysParaSettingsBll sbll = new SysParaSettingsBll(AppConifg.Current.ParkingConnection); AccessSetting accessSetting = sbll.GetOrCreateSetting <AccessSetting>(); AccessInfo access = null; if (accessSetting.Accesses != null) { access = accessSetting.Accesses.FirstOrDefault(item => item.Name == name); } if (access != null) { return(access.ID); } return(-1); }
private void FrmMain_Load(object sender, EventArgs e) { //初始化系统设置 SysParaSettingsBll ssb = new SysParaSettingsBll(AppSettings.CurrentSetting.AvailableParkConnect); //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>(); //BaseCardTypeSetting.Current = ssb.GetOrCreateSetting<BaseCardTypeSetting>(); //KeySetting.Current = ssb.GetOrCreateSetting<KeySetting>(); //GlobalVariables.SetCardReaderKeysetting(); this.ucCard1.Init(); this.ucCard1.UseToShow(); ClearCardFeePayInterface(); this.cbbPayMode.SelectedIndex = 0; }
private void FrmSystemOptions_Load(object sender, EventArgs e) { UserSettings.Current = SysParaSettingsBll.GetOrCreateSetting <UserSettings>(AppSettings.Current.ConnStr); ShowSetting(UserSettings.Current); btnOk.Enabled = Operator.Current.Permit(Permission.SystemOptions, PermissionActions.Edit); }