//add account event handler protected void btnAddAccount_Click(object sender, EventArgs e) { if (validateInputs()) { CreditCardSvc.CCAccount myAccount = new CreditCardSvc.CCAccount(); myAccount.CCNum = txtCCNum.Text; myAccount.CCType = ddlCCType.SelectedValue; myAccount.CustID = ddlCustomer.SelectedValue; myAccount.Cvc = txtCVC.Text; myAccount.ExpDate = txtDate.Value; myAccount.Limit = txtAmount.Value; CCCustomer tempCustomer = new CCCustomer(); tempCustomer.LastName = ddlCustomer.SelectedItem.Text; int clientVerificationCode = ccProc.generateVerificationCode(tempCustomer); lblDisplay.Text = pxy.addAccount(clientVerificationCode, Int32.Parse(myAccount.CustID), ref myAccount, API_KEY); lblDisplay.Visible = true; populateAccounts(); } }
public string updateAccount(ref CCAccount myAccount, int apiKey) { object[] results = this.Invoke("updateAccount", new object[] { myAccount, apiKey }); myAccount = ((CCAccount)(results[1])); return((string)(results[0])); }
/// <remarks/> public void updateAccountAsync(CCAccount myAccount, int apiKey, object userState) { if ((this.updateAccountOperationCompleted == null)) { this.updateAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnupdateAccountOperationCompleted); } this.InvokeAsync("updateAccount", new object[] { myAccount, apiKey }, this.updateAccountOperationCompleted, userState); }
public string addAccount(int clientVerificationCode, int custID, ref CCAccount myAccount, int apiKey) { object[] results = this.Invoke("addAccount", new object[] { clientVerificationCode, custID, myAccount, apiKey }); myAccount = ((CCAccount)(results[1])); return((string)(results[0])); }
/// <remarks/> public void addAccountAsync(int clientVerificationCode, int custID, CCAccount myAccount, int apiKey, object userState) { if ((this.addAccountOperationCompleted == null)) { this.addAccountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnaddAccountOperationCompleted); } this.InvokeAsync("addAccount", new object[] { clientVerificationCode, custID, myAccount, apiKey }, this.addAccountOperationCompleted, userState); }
protected void gvAccounts_RowUpdating(Object sender, System.Web.UI.WebControls.GridViewUpdateEventArgs e) { int rowIndex = e.RowIndex; string ccNum = gvAccounts.Rows[rowIndex].Cells[CCNUM_COL].Text; // Retrieve a reference to a TextBox created by the GridView when it's in edit-mode TextBox TBox = (TextBox)gvAccounts.Rows[rowIndex].Cells[EXPIR_COL].Controls[FIRST_CONTROL]; string expirationDate = TBox.Text; TBox = (TextBox)gvAccounts.Rows[rowIndex].Cells[LIMIT_COL].Controls[FIRST_CONTROL]; string limit = TBox.Text; if (validateGvInputs(limit, expirationDate)) { DropDownList dropDown = (DropDownList)gvAccounts.Rows[rowIndex].FindControl("ddlStatus"); string status = dropDown.SelectedValue; CreditCardSvc.CCAccount tempAccount = new CreditCardSvc.CCAccount(); tempAccount.CCNum = ccNum; tempAccount.ExpDate = expirationDate; tempAccount.Status = status; tempAccount.Limit = limit; lblDisplay.Text = pxy.updateAccount(ref tempAccount, API_KEY); lblDisplay.Visible = true; // Set the GridView back to the original state. // No rows currently being edited. gvAccounts.EditIndex = -1; populateAccounts(); } }
/// <remarks/> public void updateAccountAsync(CCAccount myAccount, int apiKey) { this.updateAccountAsync(myAccount, apiKey, null); }
/// <remarks/> public void addAccountAsync(int clientVerificationCode, int custID, CCAccount myAccount, int apiKey) { this.addAccountAsync(clientVerificationCode, custID, myAccount, apiKey, null); }