UpdateOfficeInfo
Posted by Angham Al-Banawien, Last modified by Diab Mansour on 19 July 2021 09:49 PM

 Syntax

 Public Function UpdateOfficeInfo(ClientID As Integer, OfficeName As String, UsernameAs String, Password As String, Phone As String, Fax As String, Mobile As String, TelPWD As String, POB As String, Email As String, Address As String, isDemo As Boolean, isReadOnly As Boolean , ChangePW as Boolean)As String

Description

The UpdateOfficeInfo operation is used to update office information for a specific given office ID. Use GetClientsIDs to get list of IDs under the specific
parent name.

Request Parameters

Name Description  Required
 ClientID
  • Office number to be updated
  • Type :Integer
  • Default : None
  • Constraints : Must be valid parent username and accessible by logged in dealer

 

 Yes

 OfficeName
  • Office description.
  • Type : String
  • Default : None

 

 Yes

 Username
  • Office username.
  • Type : String.
  • Default : None

 

 Yes

 Password
  • Office password.
  • Type : String.
  • Default : None

 

 Yes

 Phone
  • office phone number
  • Type : String.
  • Default : None

 

 Yes

 Fax
  • office Fax number
  • Type : String
  • Default : None

 

 Yes

 Mobile
  • office mobile number
  • Type : String

 

 Yes

 TelPWD
  • Office Telephone password number
  • Type : String
  • Default : None

 

 Yes

 POB
  • Post office box
  • Type : String
  • Default : None

 

 Yes

 Email
  • office Email address
  • Type : String
  • Default : None

 

 Yes

 Address
  • office Address
  • Type : String
  • Default : None

 

 Yes

isDemo
  • To indicate if the office is demo or not.
  • Type : Boolean
  • Default : None

 

 Yes

isReadOnly
  • To indicate if the client will only monitor the trades or not
  • Type: Boolean
  • Default : None

 

Yes

ChangePW
  • To indicate if the office will have to force change the password after first login or not  or not.
  • Type : Boolean
  • Default : None

 

Yes


Response Elements

Name Description 
 Result

The operation return updated office identifier in case success, otherwise an explicit  error code is returned 


Sample

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>UpdateOfficeInfo</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<script >
var hisTable;
$(document).ready(function () {
var urlStr = "http://173.249.35.43/webtrader/webservice.svc";
jQuery.support.cors = true;
$("#progress").ajaxStart(function () { $(this).css("display", "block"); });
$("#progress").ajaxComplete(function () { $(this).css("display", "none"); });
function onSuccessResult(response) {
response = eval('(' + response + ')')
if (response.UserId == -1 || response.UserId == -207) {
$("#resultData").html("Invalid username or password");
}
else if (response.UserId == -231) {
$("#resultData").html("You must have at least one account");
}
else if (response == null || response == "" || response.UserId < 0) {
$("#resultData").html("Error while login.Please try later");
}
else {
$("#resultData").html("SuccessResult ... UserId is :" + response.UserId);
}
}
$("#resultAction").ajaxError(function (result) { $(this).html('An error occured'); });
function onErrorResult(result) {
alert('Service call faild : ' + result.status + ' ' + result.statusText);
}
$("#btnLogin").click(function () {
$.getJSON(urlStr + "/BackofficeLogin?username=" + $("#txtusername").val() + "&password=" + $("#txtpassword").val() + "&callback=?" , onSuccessResult);
});
function onSuccessResultAction(dataResult) {
dataResult = eval('(' + dataResult + ')');
$("#resultData").html(dataResult);
if (dataResult > 0) {
$("#resultData").html("SuccessResult ... Office is :" + dataResult);
}
else {
var errDetail = "https://support.hybridsolutions.com//index.php?/Knowledgebase/Article/View/4603"
$("#resultData").html("Error Code : " + dataResult + "<br/>" + " for more details see the follwing link: " + errDetail.link(errDetail));
}

}
$("#btnAction").click(function () {
$.getJSON(urlStr + "/UpdateOfficeInfo?ClientID=" + $("#txtClientID").val() + "&OfficeName=" + $("#txtOfficeName").val() + "&Username=" + $("#txtUser").val() + "&Password=" + $("#txtPass").val() + "&Phone=" + $("#txtPhone").val() + "&Fax=" + $("#txtFax").val()+ "&Mobile=" + $("#txtMobile").val() + "&TelPWD=" + $("#txtTelPWD").val() + "&POB=" + $("#txtPOB").val() + "&Email=" + $("#txtEmail").val() + "&Address=" + $("#txtAddress").val() + "&isDemo=" + $("#txtisDemo").val() + "&isReadOnly=" + $("#txtisReadOnly").val() + "&ChangePW=" + $("#txtChangePW").val() + "&callback=?" , onSuccessResultAction);
});
});
</script>

<body>
<table border="1px">
<tbody>
<tr>
<td>
Username: <input type="text" id="txtusername" value=""/>
Password: <input type="text" id="txtpassword" value=""/>
<button id="btnLogin"> Login </button>
</td>
</tr>
<tr>
<td>
OfficeId: <input type="text" id="txtClientID" value=""/>
OfficeName: <input type="text" id="txtOfficeName" value=""/>
UserName: <input type="text" id="txtUser" value=""/>
</td>
</tr>
<tr>
<td>
Password: <input type="text" id="txtPass" value=""/>
Phone: <input type="text" id="txtPhone" value=""/> 
Fax: <input type="text" id="txtFax" value=""/>
</td>
</tr>
<tr>
<td>
Mobile: <input type="text" id="txtMobile" value=""/>
TelPWD: <input type="text" id="txtTelPWD" value=""/>
POB: <input type="text" id="txtPOB" value=""/>
</td>
</tr>
<tr>
<td>
Email: <input type="text" id="txtEmail" value=""/>
Address: <input type="text" id="txtAddress" value=""/>
IsDemo: <input type="text" id="txtisDemo" value=""/>
</td>
</tr>
<tr>
<td>
isReadOnly: <input type="text" id="txtisReadOnly" value=""/>
ChangePW: <input type="text" id="txtChangePW" value=""/>
<button id="btnAction"> UpdateOfficeInfo </button>
</td>
</tr>
</tbody>
</table>
<div id="resultData"> </div>
<div id="resultAction"> </div>
<div style="display:none" id="progress">Loading ... </div>
</body>
</html> 

 


See Also


VertexFX Backoffice WCF Service Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions