New Button "Save Changes and Exit" in Lync, Blackberry, CRM edit user
This commit is contained in:
parent
cf0092bc9f
commit
87638b08dd
9 changed files with 97 additions and 10 deletions
|
@ -80,6 +80,12 @@
|
||||||
<asp:Button runat="server" ID="btnDeleteData" meta:resourcekey="btnDeleteData"
|
<asp:Button runat="server" ID="btnDeleteData" meta:resourcekey="btnDeleteData"
|
||||||
CssClass="Button1" onclick="btnDeleteData_Click" />
|
CssClass="Button1" onclick="btnDeleteData_Click" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<asp:Button runat="server" ID="btnSaveExit" Text="Save Changes and Exit" CssClass="Button1"
|
||||||
|
meta:resourcekey="btnSaveExit" OnClick="btnSaveExit_Click"></asp:Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -113,5 +113,13 @@ namespace WebsitePanel.Portal.BlackBerry
|
||||||
messageBox.ShowWarningMessage(CANNOT_DELETE_BLACKBERRY_DATA);
|
messageBox.ShowWarningMessage(CANNOT_DELETE_BLACKBERRY_DATA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void btnSaveExit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
|
||||||
|
"blackberry_users",
|
||||||
|
"SpaceID=" + PanelSecurity.PackageId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.BlackBerry {
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Button btnDeleteData;
|
protected global::System.Web.UI.WebControls.Button btnDeleteData;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSaveExit 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.Button btnSaveExit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,10 @@
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<asp:Button runat="server" ID="btnUpdate" Text="Update" meta:resourcekey="btnUpdate" CssClass="Button1" onclick="btnUpdate_Click" />
|
<asp:Button runat="server" ID="btnUpdate" Text="Save Changes" meta:resourcekey="btnUpdate" CssClass="Button1" onclick="btnUpdate_Click" />
|
||||||
|
<asp:Button runat="server" ID="btnSaveExit" Text="Save Changes and Exit" CssClass="Button1"
|
||||||
|
meta:resourcekey="btnSaveExit" OnClick="btnSaveExit_Click"></asp:Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -111,7 +111,7 @@ namespace WebsitePanel.Portal.CRM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
protected bool SaveSettings()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -143,13 +143,33 @@ namespace WebsitePanel.Portal.CRM
|
||||||
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
|
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
|
||||||
else
|
else
|
||||||
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
|
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
|
||||||
|
|
||||||
|
return res.IsSuccess && res2.IsSuccess;
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
messageBox.ShowErrorMessage("UPDATE_CRM_USER_ROLES", ex);
|
messageBox.ShowErrorMessage("UPDATE_CRM_USER_ROLES", ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnSaveExit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (SaveSettings())
|
||||||
|
{
|
||||||
|
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
|
||||||
|
"CRMUsers",
|
||||||
|
"SpaceID=" + PanelSecurity.PackageId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ActivateUser()
|
private void ActivateUser()
|
||||||
{
|
{
|
||||||
ResultObject res = ES.Services.CRM.ChangeUserState(PanelRequest.ItemID, PanelRequest.AccountID, false);
|
ResultObject res = ES.Services.CRM.ChangeUserState(PanelRequest.ItemID, PanelRequest.AccountID, false);
|
||||||
|
|
|
@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.CRM {
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Button btnUpdate;
|
protected global::System.Web.UI.WebControls.Button btnUpdate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSaveExit 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.Button btnSaveExit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,10 @@
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<div class="FormFooterClean">
|
<div class="FormFooterClean">
|
||||||
<asp:Button runat="server" ID="btnSave" meta:resourcekey="btnSave" ValidationGroup="Validation1"
|
<asp:Button runat="server" ID="btnSave" Text="Save Changes" meta:resourcekey="btnSave" ValidationGroup="Validation1"
|
||||||
CssClass="Button1" onclick="btnSave_Click" />
|
CssClass="Button1" onclick="btnSave_Click" />
|
||||||
|
<asp:Button runat="server" ID="btnSaveExit" Text="Save Changes and Exit" meta:resourcekey="btnSaveExit" ValidationGroup="Validation1"
|
||||||
|
CssClass="Button1" OnClick="btnSaveExit_Click"></asp:Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -120,10 +120,10 @@ namespace WebsitePanel.Portal.Lync
|
||||||
Utils.SelectListItem(ddlPhoneNumber, lyncUser.LineUri);
|
Utils.SelectListItem(ddlPhoneNumber, lyncUser.LineUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnSave_Click(object sender, EventArgs e)
|
protected bool SaveSettings()
|
||||||
{
|
{
|
||||||
if (!Page.IsValid)
|
if (!Page.IsValid)
|
||||||
return;
|
return false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
@ -141,15 +141,36 @@ namespace WebsitePanel.Portal.Lync
|
||||||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||||
{
|
{
|
||||||
messageBox.ShowSuccessMessage("UPDATE_LYNC_USER");
|
messageBox.ShowSuccessMessage("UPDATE_LYNC_USER");
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
messageBox.ShowMessage(res, "UPDATE_LYNC_USER", "LYNC");
|
messageBox.ShowMessage(res, "UPDATE_LYNC_USER", "LYNC");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
}
|
||||||
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
messageBox.ShowErrorMessage("UPDATE_LYNC_USER", ex);
|
messageBox.ShowErrorMessage("UPDATE_LYNC_USER", ex);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnSaveExit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (SaveSettings())
|
||||||
|
{
|
||||||
|
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
|
||||||
|
"lync_users",
|
||||||
|
"SpaceID=" + PanelSecurity.PackageId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -201,5 +201,14 @@ namespace WebsitePanel.Portal.Lync {
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSaveExit 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.Button btnSaveExit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue