public static Credentials GetCredentials() { string LicenseServer = ConfigurationUtility.GetValue <string>("LicenseServer"); string UserName = ConfigurationUtility.GetValue <string>("UserName"); string Password = ConfigurationUtility.GetValue <string>("Password"); string DbServerType = ConfigurationUtility.GetValue <SAPbobsCOM.BoDataServerTypes>("DbServerType").ToString(); string SQLServer = ConfigurationUtility.GetValue <string>("SQLServer"); string SQLUserName = ConfigurationUtility.GetValue <string>("SQLUserName"); string SQLPassword = ConfigurationUtility.GetValue <string>("SQLPassword"); string DataBaseName = ConfigurationUtility.GetValue <string>("DataBaseName"); string Language = ConfigurationUtility.GetValue <SAPbobsCOM.BoSuppLangs>("Language").ToString(); return(new Credentials() { LicenseServer = ConfigurationUtility.GetValue <string>("LicenseServer"), UserName = ConfigurationUtility.GetValue <string>("UserName"), Password = ConfigurationUtility.GetValue <string>("Password"), DbServerType = ConfigurationUtility.GetValue <SAPbobsCOM.BoDataServerTypes>("DbServerType"), SQLServer = ConfigurationUtility.GetValue <string>("SQLServer"), SQLUserName = ConfigurationUtility.GetValue <string>("SQLUserName"), SQLPassword = ConfigurationUtility.GetValue <string>("SQLPassword"), DataBaseName = ConfigurationUtility.GetValue <string>("DataBaseName"), Language = ConfigurationUtility.GetValue <SAPbobsCOM.BoSuppLangs>("Language"), }); }
/// <summary> /// Coloca los controles a su estado original. /// </summary> private void ClearControls() { mLonId = 0; txtCommission.Text = ConfigurationUtility.GetValue <string>("Comission").ToString(); dpDate.SelectedDate = DateTime.Now; cbType.SelectedValue = null; cbCategory.SelectedValue = null; cbType.Text = "Seleccionar"; cbCategory.Text = "Seleccionar"; List <Control> lLstControls = new List <Control>(); lLstControls.Add(txtCommission); lLstControls.Add(dpDate); lLstControls.Add(cbType); lLstControls.Add(cbCategory); this.ModifyControlColorBlack(lLstControls); lblMessage.Visibility = Visibility.Collapsed; btnSave.Content = "Guardar"; lbltitle.Content = "Nuevo registro"; btnDelete.Visibility = Visibility.Collapsed; btnNew.Visibility = Visibility.Collapsed; btnReopen.Visibility = Visibility.Collapsed; txtFolio.Text = GetNextFolio(); LoadDatagrid(); }
private static int GetMaxLoagView() { try { return(ConfigurationUtility.GetValue <int>("MaxLogView")); } catch { return(1000); } }
/// <summary> /// Evento al terminar de cargar la pantalla.- /// </summary> private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (!grdList.IsBlocked() && !mBolReadOnly) { mObjWorker = new Thread(() => LoadDatagrid()); mObjWorker.Start(); LoadAuctionTypes(); LoadAuctionCategories(); txtFolio.Text = GetNextFolio().ToString(); txtCommission.Text = ConfigurationUtility.GetValue <string>("Comission").ToString(); dpDate.SelectedDate = DateTime.Now; } }
private void cbCategory_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cbCategory.SelectedIndex != -1) { if (cbCategory.SelectedIndex == 0) { txtCommission.Text = ConfigurationUtility.GetValue <string>("Comission").ToString(); //txtCommission.IsEnabled = false; } else { txtCommission.IsEnabled = true; } txtFolio.Text = GetNextFolio(); } }
private string GetCostingCode() { return(ConfigurationUtility.GetValue <string>("CostCenter").ToString()); }
private static string GetDebitAccount() { // 1070050001000 Otros deudores diversos (Activo) return(ConfigurationUtility.GetValue <string>("DebitAccount")); }
/// <summary> /// Gets a configuration value. /// </summary> /// <typeparam name="T">Type of the returned value.</typeparam> /// <param name="nameValueCollection">Configuration containing a list of key-value pairs.</param> /// <param name="key"></param> /// <param name="valueConverter">A <see cref="ISettingValueConverter{T}"/> that converts configuration value literals to the type <typeparamref name="T"/>.</param> /// <returns>A configuration value of the type <typeparamref name="T"/></returns> public static T GetValue <T>(this NameValueCollection nameValueCollection, string key, ISettingValueConverter <T> valueConverter = null) => ConfigurationUtility.GetValue(nameValueCollection, key, false, default, valueConverter);
private bool IsVirtualMode() { return(ConfigurationUtility.GetValue <bool>("VirtualMode")); }
private StopBits GetStopBits(string pStrConfigurationKey) { return(ConfigurationUtility.GetValue <StopBits>(string.Concat(pStrConfigurationKey, "StopBits"))); }
private int GetDataBits(string pStrConfigurationKey) { return(ConfigurationUtility.GetValue <int>(string.Concat(pStrConfigurationKey, "DataBits"))); }
private int GetBaudRate() { return(ConfigurationUtility.GetValue <int>("BaudRate")); }
private string GetThreePercentItem() { return ConfigurationUtility.GetValue<string>("ThreePercent"); }
private string GetServiceVersion() { return mObjQueryManager.GetValue("U_Value", "Name", ConfigurationUtility.GetValue<string>("ServVersion"), "[@UG_CONFIG]"); }
private string GetRejectionWarehouse() { return ConfigurationUtility.GetValue<string>("RejectionWarehouse"); }
private string GetPortName(string pStrConfigurationKey) { return(ConfigurationUtility.GetValue <string>(string.Concat(pStrConfigurationKey, "PortName"))); }
private int GetBaudRate(string pStrConfigurationKey) { return(ConfigurationUtility.GetValue <int>(string.Concat(pStrConfigurationKey, "BaudRate"))); }
private int GetDataBits() { return(ConfigurationUtility.GetValue <int>("DataBits")); }
private Parity GetParity(string pStrConfigurationKey) { return(ConfigurationUtility.GetValue <Parity>(string.Concat(pStrConfigurationKey, "Parity"))); }
private Parity GetParity() { return(ConfigurationUtility.GetValue <Parity>("Parity")); }
private int GetReadTimeout(string pStrConfigurationKey) { return(ConfigurationUtility.GetValue <int>(string.Concat(pStrConfigurationKey, "ReadTimeout"))); }
private StopBits GetStopBits() { return(ConfigurationUtility.GetValue <StopBits>("StopBits")); }
private string GetLocation() { return(ConfigurationUtility.GetValue <string>("Location")); }
private int GetReadTimeout() { return(ConfigurationUtility.GetValue <int>("ReadTimeout")); }
private static string GetCostCenter() { return(ConfigurationUtility.GetValue <string>("CostCenter")); }
private string GetPortName() { return(ConfigurationUtility.GetValue <string>("PortName")); }
private static string GetCreditAccount() { // 2040010004000 Otros acreedores diversos (Pasivo) return(ConfigurationUtility.GetValue <string>("CreditAccount")); }
private string GetChannelName() { return(ConfigurationUtility.GetValue <string>("ChannelName")); }
/// <summary> /// Gets a value from a <see cref="IConfiguration"/>. Returns <paramref name="defaultValue"/> if no key was found. /// </summary> /// <typeparam name="T">Type of the returned value.</typeparam> /// <param name="configuration">Configuration containing a list of key-value pairs.</param> /// <param name="key">The configuration key.</param> /// <param name="defaultValue">Default value to return if no key is found.</param> /// <param name="valueConverter">A <see cref="ISettingValueConverter{T}"/> that converts configuration value literals to the type <typeparamref name="T"/>.</param> /// <returns>A value of the type <typeparamref name="T"/>.</returns> public static T GetValue <T>(this IConfiguration configuration, string key, T defaultValue, ISettingValueConverter <T> valueConverter = null) => ConfigurationUtility.GetValue(configuration, key, true, defaultValue, valueConverter);
private int GetPort() { return(ConfigurationUtility.GetValue <int>("Port")); }