//Interface public IssueMgtConfiguration() { //Constructor this.mUConfig = new UserConfiguration(); AppServiceClient configClient = new AppServiceClient(); UserConfiguration c = configClient.GetUserConfiguration2(App.Product, new string[] { Environment.UserName, Environment.MachineName }); foreach (KeyValuePair <object, object> e in c) { this.mUConfig.Add(e.Key, e.Value); } configClient.Close(); }
public UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get configuration data for the specified application and usernames UserConfiguration config = null; try { // config = new UserConfiguration(application); DataSet ds = new DataService().FillDataset(this.mConnectionID, USP_CONFIG_GETLIST, TBL_CONFIGURATION, new object[] { application }); if (ds != null && ds.Tables[TBL_CONFIGURATION] != null) { for (int i = 0; i < ds.Tables[TBL_CONFIGURATION].Rows.Count; i++) { string userName = ds.Tables[TBL_CONFIGURATION].Rows[i]["PCName"].ToString(); string key = ds.Tables[TBL_CONFIGURATION].Rows[i]["Key"].ToString(); string value = ds.Tables[TBL_CONFIGURATION].Rows[i]["Value"].ToString(); if (!config.ContainsKey(key)) { if (userName.ToLower() == UserConfiguration.USER_DEFAULT.ToLower()) { config.Add(key, value); } else { for (int j = 0; j < usernames.Length; j++) { if (userName.ToLower() == usernames[j].ToLower()) { config.Add(key, value); } } } } else { for (int j = 0; j < usernames.Length; j++) { if (userName.ToLower() == usernames[j].ToLower()) { config[key] = value; } } } } } } catch (Exception ex) { throw new FaultException <ConfigurationFault>(new ConfigurationFault(ex.Message), "Unexpected Error"); } return(config); }
public UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get configuration data for the specified application and usernames UserConfiguration config = null; try { // config = new UserConfiguration(application); AppConfigDS configDS = new AppConfigDS(); DataSet ds = fillDataset(USP_CONFIG_GETLIST, TBL_CONFIGURATION, new object[] { application }); if (ds != null) { configDS.Merge(ds, true, MissingSchemaAction.Ignore); for (int i = 0; i < configDS.ConfigTable.Rows.Count; i++) { ConfigurationEntry entry = new ConfigurationEntry(configDS.ConfigTable[i]); if (!config.ContainsKey(entry.Key)) { if (entry.UserName.ToLower() == UserConfiguration.USER_DEFAULT.ToLower()) { config.Add(entry.Key, entry.Value); } else { for (int j = 0; j < usernames.Length; j++) { if (entry.UserName.ToLower() == usernames[j].ToLower()) { config.Add(entry.Key, entry.Value); } } } } else { for (int j = 0; j < usernames.Length; j++) { if (entry.UserName.ToLower() == usernames[j].ToLower()) { config[entry.Key] = entry.Value; } } } } } } catch (Exception ex) { throw new FaultException <ConfigurationFault>(new ConfigurationFault(new ApplicationException("Unexpected error while reading the user configuration.", ex))); } return(config); }
public static UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get the application configuration for the specified user UserConfiguration config = null; RateQuoteServiceClient client = new RateQuoteServiceClient(); try { config = new UserConfiguration(); // client.GetUserConfiguration(application, usernames); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> cfe) { client.Abort(); throw new ApplicationException(cfe.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(config); }
public UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get the operating enterprise terminal UserConfiguration config = null; KronosClient _Client = null; try { _Client = new KronosClient(); config = _Client.GetUserConfiguration(application, usernames); _Client.Close(); } catch (FaultException fe) { throw new ApplicationException("GetUserConfiguration() service error.", fe); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetUserConfiguration() timeout error.", te); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetUserConfiguration() communication error.", ce); } return(config); }
public LoadTenderConfiguration() { //Constructor this.mConfig = TsortGateway.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public ApplicationConfiguration() { //Constructor this.mConfig = ShipScheduleGateway.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public MobileDevicesConfiguration() { //Constructor this.mConfig = MobileDevicesProxy.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public InvoicingConfiguration() { //Constructor this.mConfig = InvoicingProxy.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public RateQuoteConfiguration() { //Constructor this.mConfig = FinanceGateway.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public DeliveryPointsConfiguration() { //Constructor this.mConfig = DeliveryPointsProxy.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public RateWareConfiguration() { //Constructor this.mConfig = RateWareProxy.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public ISDExportConfiguration() { //Constructor this.mConfig = AgentLineHaulGateway.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
//Interface public IDViewerConfiguration() { //Constructor this.mConfig = BadgeGateway.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public DispatchConfiguration() { //Constructor this.mConfig = FreightGateway.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }
public RSReportsConfiguration() { //Constructor this.mConfig = TerminalsGateway.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName }); }