//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50215.44
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50215.44.
//
namespace SmartInstitute.Automation.SmartInstituteServices.AccountService {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="AccountServiceSoap", Namespace="http://oazabir.com/webservices/smartinstitute")]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(AccountBase))]
public partial class AccountService : System.Web.Services.Protocols.SoapHttpClientProtocol {
private CredentialSoapHeader credentialSoapHeaderValueField;
private System.Threading.SendOrPostCallback GetAccountsOfStudentOperationCompleted;
private System.Threading.SendOrPostCallback SaveAccountOperationCompleted;
private System.Threading.SendOrPostCallback SaveAccountsOperationCompleted;
private System.Threading.SendOrPostCallback DeleteAccountOperationCompleted;
private System.Threading.SendOrPostCallback AddNewAccountOperationCompleted;
private System.Threading.SendOrPostCallback AddNewAccountsOperationCompleted;
private System.Threading.SendOrPostCallback RecalculateBalanceOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
public AccountService() {
this.Url = SmartInstitute.Automation.Properties.Settings.Default.SmartInstitute_Automation_SmartInstituteServices_AccountService_AccountService;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}
public CredentialSoapHeader CredentialSoapHeaderValue {
get {
return this.credentialSoapHeaderValueField;
}
set {
this.credentialSoapHeaderValueField = value;
}
}
public new string Url {
get {
return base.Url;
}
set {
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
&& (this.useDefaultCredentialsSetExplicitly == false))
&& (this.IsLocalFileSystemWebService(value) == false))) {
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}
public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
}
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}
/// <remarks/>
public event GetAccountsOfStudentCompletedEventHandler GetAccountsOfStudentCompleted;
/// <remarks/>
public event SaveAccountCompletedEventHandler SaveAccountCompleted;
/// <remarks/>
public event SaveAccountsCompletedEventHandler SaveAccountsCompleted;
/// <remarks/>
public event DeleteAccountCompletedEventHandler DeleteAccountCompleted;
/// <remarks/>
public event AddNewAccountCompletedEventHandler AddNewAccountCompleted;
/// <remarks/>
public event AddNewAccountsCompletedEventHandler AddNewAccountsCompleted;
/// <remarks/>
public event RecalculateBalanceCompletedEventHandler RecalculateBalanceCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("CredentialSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://oazabir.com/webservices/smartinstitute/GetAccountsOfStudent", RequestNamespace="http://oazabir.com/webservices/smartinstitute", ResponseNamespace="http://oazabir.com/webservices/smartinstitute", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public Account[] GetAccountsOfStudent(int studentID) {
object[] results = this.Invoke("GetAccountsOfStudent", new object[] {
studentID});
return ((Account[])(results[0]));
}
/// <remarks/>
public void GetAccountsOfStudentAsync(int studentID) {
this.GetAccountsOfStudentAsync(studentID, null);
}
/// <remarks/>
public void GetAccountsOfStudentAsync(int studentID, object userState) {
if ((this.GetAccountsOfStudentOperationCompleted == null)) {
this.GetAccountsOfStudentOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountsOfStudentOperationCompleted);
}
this.InvokeAsync("GetAccountsOfStudent", new object[] {
studentID}, this.GetAccountsOfStudentOperationCompleted, userState);
}
private void OnGetAccountsOfStudentOperationCompleted(object arg) {
if ((this.GetAccountsOfStudentCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetAccountsOfStudentCompleted(this, new GetAccountsOfStudentCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("CredentialSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://oazabir.com/webservices/smartinstitute/SaveAccount", RequestNamespace="http://oazabir.com/webservices/smartinstitute", ResponseNamespace="http://oazabir.com/webservices/smartinstitute", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool SaveAccount(ref Account account) {
object[] results = this.Invoke("SaveAccount", new object[] {
account});
account = ((Account)(results[1]));
return ((bool)(results[0]));
}
/// <remarks/>
public void SaveAccountAsync(Account account) {
this.SaveAccountAsync(account, null);
}
/// <remarks/>
public void SaveAccountAsync(Account account, object userState) {
if ((this.SaveAccountOperationCompleted == null)) {
this.SaveAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveAccountOperationCompleted);
}
this.InvokeAsync("SaveAccount", new object[] {
account}, this.SaveAccountOperationCompleted, userState);
}
private void OnSaveAccountOperationCompleted(object arg) {
if ((this.SaveAccountCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SaveAccountCompleted(this, new SaveAccountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("CredentialSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://oazabir.com/webservices/smartinstitute/SaveAccounts", RequestNamespace="http://oazabir.com/webservices/smartinstitute", ResponseNamespace="http://oazabir.com/webservices/smartinstitute", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int SaveAccounts(ref Account[] accounts) {
object[] results = this.Invoke("SaveAccounts", new object[] {
accounts});
accounts = ((Account[])(results[1]));
return ((int)(results[0]));
}
/// <remarks/>
public void SaveAccountsAsync(Account[] accounts) {
this.SaveAccountsAsync(accounts, null);
}
/// <remarks/>
public void SaveAccountsAsync(Account[] accounts, object userState) {
if ((this.SaveAccountsOperationCompleted == null)) {
this.SaveAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveAccountsOperationCompleted);
}
this.InvokeAsync("SaveAccounts", new object[] {
accounts}, this.SaveAccountsOperationCompleted, userState);
}
private void OnSaveAccountsOperationCompleted(object arg) {
if ((this.SaveAccountsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SaveAccountsCompleted(this, new SaveAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("CredentialSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://oazabir.com/webservices/smartinstitute/DeleteAccount", RequestNamespace="http://oazabir.com/webservices/smartinstitute", ResponseNamespace="http://oazabir.com/webservices/smartinstitute", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool DeleteAccount(int accountID) {
object[] results = this.Invoke("DeleteAccount", new object[] {
accountID});
return ((bool)(results[0]));
}
/// <remarks/>
public void DeleteAccountAsync(int accountID) {
this.DeleteAccountAsync(accountID, null);
}
/// <remarks/>
public void DeleteAccountAsync(int accountID, object userState) {
if ((this.DeleteAccountOperationCompleted == null)) {
this.DeleteAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteAccountOperationCompleted);
}
this.InvokeAsync("DeleteAccount", new object[] {
accountID}, this.DeleteAccountOperationCompleted, userState);
}
private void OnDeleteAccountOperationCompleted(object arg) {
if ((this.DeleteAccountCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteAccountCompleted(this, new DeleteAccountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("CredentialSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://oazabir.com/webservices/smartinstitute/AddNewAccount", RequestNamespace="http://oazabir.com/webservices/smartinstitute", ResponseNamespace="http://oazabir.com/webservices/smartinstitute", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool AddNewAccount(ref Account account) {
object[] results = this.Invoke("AddNewAccount", new object[] {
account});
account = ((Account)(results[1]));
return ((bool)(results[0]));
}
/// <remarks/>
public void AddNewAccountAsync(Account account) {
this.AddNewAccountAsync(account, null);
}
/// <remarks/>
public void AddNewAccountAsync(Account account, object userState) {
if ((this.AddNewAccountOperationCompleted == null)) {
this.AddNewAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddNewAccountOperationCompleted);
}
this.InvokeAsync("AddNewAccount", new object[] {
account}, this.AddNewAccountOperationCompleted, userState);
}
private void OnAddNewAccountOperationCompleted(object arg) {
if ((this.AddNewAccountCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddNewAccountCompleted(this, new AddNewAccountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("CredentialSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://oazabir.com/webservices/smartinstitute/AddNewAccounts", RequestNamespace="http://oazabir.com/webservices/smartinstitute", ResponseNamespace="http://oazabir.com/webservices/smartinstitute", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddNewAccounts(ref Account[] accounts) {
object[] results = this.Invoke("AddNewAccounts", new object[] {
accounts});
accounts = ((Account[])(results[1]));
return ((int)(results[0]));
}
/// <remarks/>
public void AddNewAccountsAsync(Account[] accounts) {
this.AddNewAccountsAsync(accounts, null);
}
/// <remarks/>
public void AddNewAccountsAsync(Account[] accounts, object userState) {
if ((this.AddNewAccountsOperationCompleted == null)) {
this.AddNewAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddNewAccountsOperationCompleted);
}
this.InvokeAsync("AddNewAccounts", new object[] {
accounts}, this.AddNewAccountsOperationCompleted, userState);
}
private void OnAddNewAccountsOperationCompleted(object arg) {
if ((this.AddNewAccountsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddNewAccountsCompleted(this, new AddNewAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("CredentialSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://oazabir.com/webservices/smartinstitute/RecalculateBalance", RequestNamespace="http://oazabir.com/webservices/smartinstitute", ResponseNamespace="http://oazabir.com/webservices/smartinstitute", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool RecalculateBalance(int studentID) {
object[] results = this.Invoke("RecalculateBalance", new object[] {
studentID});
return ((bool)(results[0]));
}
/// <remarks/>
public void RecalculateBalanceAsync(int studentID) {
this.RecalculateBalanceAsync(studentID, null);
}
/// <remarks/>
public void RecalculateBalanceAsync(int studentID, object userState) {
if ((this.RecalculateBalanceOperationCompleted == null)) {
this.RecalculateBalanceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRecalculateBalanceOperationCompleted);
}
this.InvokeAsync("RecalculateBalance", new object[] {
studentID}, this.RecalculateBalanceOperationCompleted, userState);
}
private void OnRecalculateBalanceOperationCompleted(object arg) {
if ((this.RecalculateBalanceCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.RecalculateBalanceCompleted(this, new RecalculateBalanceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
}
System.Uri wsUri = new System.Uri(url);
if ((((wsUri.Port >= 1024)
&& (wsUri.Port <= 5000))
&& (string.Compare(wsUri.Host, "localHost", true) == 0))) {
return true;
}
return false;
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://oazabir.com/webservices/smartinstitute")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://oazabir.com/webservices/smartinstitute", IsNullable=false)]
public partial class CredentialSoapHeader : System.Web.Services.Protocols.SoapHeader {
private string usernameField;
private string passwordHashField;
private string versionNoField;
private string securityKeyField;
/// <remarks/>
public string Username {
get {
return this.usernameField;
}
set {
this.usernameField = value;
}
}
/// <remarks/>
public string PasswordHash {
get {
return this.passwordHashField;
}
set {
this.passwordHashField = value;
}
}
/// <remarks/>
public string VersionNo {
get {
return this.versionNoField;
}
set {
this.versionNoField = value;
}
}
/// <remarks/>
public string SecurityKey {
get {
return this.securityKeyField;
}
set {
this.securityKeyField = value;
}
}
}
/// <remarks/>
public delegate void GetAccountsOfStudentCompletedEventHandler(object sender, GetAccountsOfStudentCompletedEventArgs e);
/// <remarks/>
public partial class GetAccountsOfStudentCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetAccountsOfStudentCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public Account[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((Account[])(this.results[0]));
}
}
}
/// <remarks/>
public delegate void SaveAccountCompletedEventHandler(object sender, SaveAccountCompletedEventArgs e);
/// <remarks/>
public partial class SaveAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SaveAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
/// <remarks/>
public Account account {
get {
this.RaiseExceptionIfNecessary();
return ((Account)(this.results[1]));
}
}
}
/// <remarks/>
public delegate void SaveAccountsCompletedEventHandler(object sender, SaveAccountsCompletedEventArgs e);
/// <remarks/>
public partial class SaveAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SaveAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
/// <remarks/>
public Account[] accounts {
get {
this.RaiseExceptionIfNecessary();
return ((Account[])(this.results[1]));
}
}
}
/// <remarks/>
public delegate void DeleteAccountCompletedEventHandler(object sender, DeleteAccountCompletedEventArgs e);
/// <remarks/>
public partial class DeleteAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DeleteAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
public delegate void AddNewAccountCompletedEventHandler(object sender, AddNewAccountCompletedEventArgs e);
/// <remarks/>
public partial class AddNewAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal AddNewAccountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
/// <remarks/>
public Account account {
get {
this.RaiseExceptionIfNecessary();
return ((Account)(this.results[1]));
}
}
}
/// <remarks/>
public delegate void AddNewAccountsCompletedEventHandler(object sender, AddNewAccountsCompletedEventArgs e);
/// <remarks/>
public partial class AddNewAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal AddNewAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
/// <remarks/>
public Account[] accounts {
get {
this.RaiseExceptionIfNecessary();
return ((Account[])(this.results[1]));
}
}
}
/// <remarks/>
public delegate void RecalculateBalanceCompletedEventHandler(object sender, RecalculateBalanceCompletedEventArgs e);
/// <remarks/>
public partial class RecalculateBalanceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal RecalculateBalanceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
}