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
|
@ -79,7 +79,13 @@
|
|||
|
||||
<asp:Button runat="server" ID="btnDeleteData" meta:resourcekey="btnDeleteData"
|
||||
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>
|
||||
|
|
|
@ -113,5 +113,13 @@ namespace WebsitePanel.Portal.BlackBerry
|
|||
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.
|
||||
/// </remarks>
|
||||
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>
|
||||
</div>
|
||||
<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>
|
||||
<br />
|
||||
</div>
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace WebsitePanel.Portal.CRM
|
|||
}
|
||||
}
|
||||
|
||||
protected void btnUpdate_Click(object sender, EventArgs e)
|
||||
protected bool SaveSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -143,13 +143,33 @@ namespace WebsitePanel.Portal.CRM
|
|||
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
|
||||
else
|
||||
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);
|
||||
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()
|
||||
{
|
||||
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.
|
||||
/// </remarks>
|
||||
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>
|
||||
|
||||
<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" />
|
||||
<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>
|
||||
|
|
|
@ -120,10 +120,10 @@ namespace WebsitePanel.Portal.Lync
|
|||
Utils.SelectListItem(ddlPhoneNumber, lyncUser.LineUri);
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
protected bool SaveSettings()
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
return false;
|
||||
try
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
@ -132,7 +132,7 @@ namespace WebsitePanel.Portal.Lync
|
|||
string lineUri = "";
|
||||
if ((enterpriseVoiceQuota) & (ddlPhoneNumber.Items.Count != 0)) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text;
|
||||
|
||||
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
|
||||
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
|
||||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||
{
|
||||
res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, lineUri);
|
||||
|
@ -141,15 +141,36 @@ namespace WebsitePanel.Portal.Lync
|
|||
if (res.IsSuccess && res.ErrorCodes.Count == 0)
|
||||
{
|
||||
messageBox.ShowSuccessMessage("UPDATE_LYNC_USER");
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
messageBox.ShowMessage(res, "UPDATE_LYNC_USER", "LYNC");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception 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.
|
||||
/// </remarks>
|
||||
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