Ejemplo n.º 1
0
        private void SetDefaultServerSettings()
        {
            try
            {
                PopulateServers();


                ServerSetting oServerSetting = settingBL.GetServerSetting();
                if (oServerSetting != null)
                {
                    lkeServer.EditValue = oServerSetting.Name;

                    if (lkeServer.EditValue != null)
                    {
                        PopulateDatabases(lkeServer.EditValue.ToString());
                        lkeDatabases.EditValue = oServerSetting.Database;
                    }

                    txtUserName.Text = oServerSetting.UserName;
                    txtPassword.Text = oServerSetting.Password;
                }
                else
                {
                    DbUtilityHelper.DisplayMessageBox("Default server setting could not be loaded. Try again.", "warning");
                }
            }
            catch (Exception ex)
            {
                DbUtilityHelper.DisplayMessageBox("Default server setting could not be loaded. Try again.\n" + ex.Message, "error");
            }
        }
Ejemplo n.º 2
0
 private void PopulateData()
 {
     try
     {
         oServerSettingBL = oSettingBL.GetServerSetting();
         if (oServerSettingBL != null)
         {
             lkeServer.EditValue   = oServerSettingBL.Name;
             txtUserName.Text      = oServerSettingBL.UserName;
             txtPassword.Text      = oServerSettingBL.Password;
             lkeDatabase.EditValue = oServerSettingBL.Database;
         }
     }
     catch (Exception ex)
     {
         DbUtilityHelper.DisplayMessageBox(ex.Message, "error");
     }
 }