Commit changes to Display SQL Server name on Edit Database Screen

This commit is contained in:
Virtuworks 2012-08-07 20:35:32 -04:00
parent e270bdc1eb
commit 0adda57f62
5 changed files with 100 additions and 4 deletions

View file

@ -132,6 +132,12 @@
<data name="lblDatabaseName.Text" xml:space="preserve"> <data name="lblDatabaseName.Text" xml:space="preserve">
<value>Database name:</value> <value>Database name:</value>
</data> </data>
<data name="lblDBInternalServer.Text" xml:space="preserve">
<value>Internal DB Server:</value>
</data>
<data name="lblDBExternalServer.Text" xml:space="preserve">
<value>External DB Server:</value>
</data>
<data name="secUsers.Text" xml:space="preserve"> <data name="secUsers.Text" xml:space="preserve">
<value>Users</value> <value>Users</value>
</data> </data>

View file

@ -23,6 +23,16 @@ function confirmation()
<td class="NormalBold"> <td class="NormalBold">
<uc2:UsernameControl ID="usernameControl" runat="server" /> <uc2:UsernameControl ID="usernameControl" runat="server" />
</td> </td>
</tr> <tr>
<td class="SubHead" style="width: 150px;"><asp:Label ID="lblDBInternalServer" runat="server" meta:resourcekey="lblDBInternalServer" Text="Internal Server:"></asp:Label></td>
<td class="NormalBold">
<uc2:UsernameControl ID="usernameControl2" runat="server" />
</td>
</tr></tr> <tr>
<td class="SubHead" style="width: 150px;"><asp:Label ID="lblDBExternalServer" runat="server" meta:resourcekey="lblDBExternalServer" Text="External Server:"></asp:Label></td>
<td class="NormalBold">
<uc2:UsernameControl ID="usernameControl3" runat="server" />
</td>
</tr> </tr>
</table> </table>
<br /> <br />
@ -33,7 +43,7 @@ function confirmation()
<asp:Panel ID="UsersPanel" runat="server" Height="0" style="overflow:hidden;"> <asp:Panel ID="UsersPanel" runat="server" Height="0" style="overflow:hidden;">
<table cellspacing="0" cellpadding="3" width="100%"> <table cellspacing="0" cellpadding="3" width="100%">
<tr> <tr>
<td colspan="2"> <td>
<asp:CheckBoxList ID="dlUsers" runat="server" CssClass="NormalBold" DataTextField="Name" DataValueField="Name" <asp:CheckBoxList ID="dlUsers" runat="server" CssClass="NormalBold" DataTextField="Name" DataValueField="Name"
RepeatColumns="2" CellPadding="3"></asp:CheckBoxList> RepeatColumns="2" CellPadding="3"></asp:CheckBoxList>
</td> </td>

View file

@ -149,12 +149,29 @@ namespace WebsitePanel.Portal
if (!IsPostBack) if (!IsPostBack)
{ {
// bind item to controls // bind item to controls
string myintserveraddress = "";
string myextserveraddress = "";
if (item != null) if (item != null)
{ {
string[] mysettings = ES.Services.Servers.GetServiceSettings(item.ServiceId);
foreach (string setting in mysettings)
{
string[] pair = setting.Split('=');
if(String.Equals(pair[0], "ExternalAddress", StringComparison.InvariantCultureIgnoreCase))
myextserveraddress = pair[1];
if (String.Equals(pair[0], "InternalAddress", StringComparison.InvariantCultureIgnoreCase))
myintserveraddress = pair[1];
}
// bind item to controls // bind item to controls
usernameControl.Text = item.Name; usernameControl.Text = item.Name;
usernameControl.EditMode = true; usernameControl.EditMode = true;
usernameControl3.Text = myextserveraddress;
usernameControl3.EditMode = true;
usernameControl2.Text = myintserveraddress;
usernameControl2.EditMode = true;
foreach (string user in item.Users) foreach (string user in item.Users)
{ {
ListItem li = dlUsers.Items.FindByValue(user); ListItem li = dlUsers.Items.FindByValue(user);

View file

@ -1,7 +1,34 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -40,6 +67,42 @@ namespace WebsitePanel.Portal {
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.UsernameControl usernameControl; protected global::WebsitePanel.Portal.UsernameControl usernameControl;
/// <summary>
/// lblDBInternalServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblDBInternalServer;
/// <summary>
/// usernameControl2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UsernameControl usernameControl2;
/// <summary>
/// lblDBExternalServer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblDBExternalServer;
/// <summary>
/// usernameControl3 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UsernameControl usernameControl3;
/// <summary> /// <summary>
/// secUsers control. /// secUsers control.
/// </summary> /// </summary>