示例#1
0
        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"),
            });
        }
示例#2
0
        /// <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();
        }
示例#3
0
文件: LogViewer.cs 项目: xavl369/UGRS
 private static int GetMaxLoagView()
 {
     try
     {
         return(ConfigurationUtility.GetValue <int>("MaxLogView"));
     }
     catch
     {
         return(1000);
     }
 }
示例#4
0
 /// <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;
     }
 }
示例#5
0
 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();
     }
 }
示例#6
0
 private string GetCostingCode()
 {
     return(ConfigurationUtility.GetValue <string>("CostCenter").ToString());
 }
示例#7
0
 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);
示例#9
0
 private bool IsVirtualMode()
 {
     return(ConfigurationUtility.GetValue <bool>("VirtualMode"));
 }
示例#10
0
 private StopBits GetStopBits(string pStrConfigurationKey)
 {
     return(ConfigurationUtility.GetValue <StopBits>(string.Concat(pStrConfigurationKey, "StopBits")));
 }
示例#11
0
 private int GetDataBits(string pStrConfigurationKey)
 {
     return(ConfigurationUtility.GetValue <int>(string.Concat(pStrConfigurationKey, "DataBits")));
 }
示例#12
0
 private int GetBaudRate()
 {
     return(ConfigurationUtility.GetValue <int>("BaudRate"));
 }
示例#13
0
 private string GetThreePercentItem()
 {
     return ConfigurationUtility.GetValue<string>("ThreePercent");
 }
示例#14
0
 private string GetServiceVersion()
 {
     return mObjQueryManager.GetValue("U_Value", "Name", ConfigurationUtility.GetValue<string>("ServVersion"), "[@UG_CONFIG]");
 }
示例#15
0
 private string GetRejectionWarehouse()
 {
     return ConfigurationUtility.GetValue<string>("RejectionWarehouse");
 }
示例#16
0
 private string GetPortName(string pStrConfigurationKey)
 {
     return(ConfigurationUtility.GetValue <string>(string.Concat(pStrConfigurationKey, "PortName")));
 }
示例#17
0
 private int GetBaudRate(string pStrConfigurationKey)
 {
     return(ConfigurationUtility.GetValue <int>(string.Concat(pStrConfigurationKey, "BaudRate")));
 }
示例#18
0
 private int GetDataBits()
 {
     return(ConfigurationUtility.GetValue <int>("DataBits"));
 }
示例#19
0
 private Parity GetParity(string pStrConfigurationKey)
 {
     return(ConfigurationUtility.GetValue <Parity>(string.Concat(pStrConfigurationKey, "Parity")));
 }
示例#20
0
 private Parity GetParity()
 {
     return(ConfigurationUtility.GetValue <Parity>("Parity"));
 }
示例#21
0
 private int GetReadTimeout(string pStrConfigurationKey)
 {
     return(ConfigurationUtility.GetValue <int>(string.Concat(pStrConfigurationKey, "ReadTimeout")));
 }
示例#22
0
 private StopBits GetStopBits()
 {
     return(ConfigurationUtility.GetValue <StopBits>("StopBits"));
 }
示例#23
0
 private string GetLocation()
 {
     return(ConfigurationUtility.GetValue <string>("Location"));
 }
示例#24
0
 private int GetReadTimeout()
 {
     return(ConfigurationUtility.GetValue <int>("ReadTimeout"));
 }
示例#25
0
 private static string GetCostCenter()
 {
     return(ConfigurationUtility.GetValue <string>("CostCenter"));
 }
示例#26
0
 private string GetPortName()
 {
     return(ConfigurationUtility.GetValue <string>("PortName"));
 }
示例#27
0
 private static string GetCreditAccount()
 {
     // 2040010004000 Otros acreedores diversos (Pasivo)
     return(ConfigurationUtility.GetValue <string>("CreditAccount"));
 }
示例#28
0
 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);
示例#30
0
 private int GetPort()
 {
     return(ConfigurationUtility.GetValue <int>("Port"));
 }