Exemplo n.º 1
0
 public bool CompareCardTransaction(CreditCardObjects credit)
 {
     object[] results = this.Invoke("CompareCardTransaction", new object[] {
         credit
     });
     return((bool)(results[0]));
 }
Exemplo n.º 2
0
 public bool UpdateCreditCardInfor(CreditCardObjects credit, string password)
 {
     object[] results = this.Invoke("UpdateCreditCardInfor", new object[] {
         credit,
         password
     });
     return((bool)(results[0]));
 }
Exemplo n.º 3
0
 public bool AddCreditCard(CreditCardObjects credit, string password)
 {
     object[] results = this.Invoke("AddCreditCard", new object[] {
         credit,
         password
     });
     return((bool)(results[0]));
 }
Exemplo n.º 4
0
 /// <remarks/>
 public void CompareCardTransactionAsync(CreditCardObjects credit, object userState)
 {
     if ((this.CompareCardTransactionOperationCompleted == null))
     {
         this.CompareCardTransactionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCompareCardTransactionOperationCompleted);
     }
     this.InvokeAsync("CompareCardTransaction", new object[] {
         credit
     }, this.CompareCardTransactionOperationCompleted, userState);
 }
Exemplo n.º 5
0
 /// <remarks/>
 public void UpdateCreditCardInforAsync(CreditCardObjects credit, string password, object userState)
 {
     if ((this.UpdateCreditCardInforOperationCompleted == null))
     {
         this.UpdateCreditCardInforOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateCreditCardInforOperationCompleted);
     }
     this.InvokeAsync("UpdateCreditCardInfor", new object[] {
         credit,
         password
     }, this.UpdateCreditCardInforOperationCompleted, userState);
 }
Exemplo n.º 6
0
        protected void gvUpdate_RowUpdating(object sender, System.Web.UI.WebControls.GridViewUpdateEventArgs e)
        {
            int          rowIndex = e.RowIndex;
            TextBox      tBox;
            Label        label;
            DropDownList ddlUpdate;

            label = (Label)gvUpdate.Rows[rowIndex].FindControl("lblUpdateCardNumber");
            int cardNumber = int.Parse(label.Text);

            label = (Label)gvUpdate.Rows[rowIndex].FindControl("lblUpdateAmountOwed");
            float owed = float.Parse(label.Text);

            tBox = (TextBox)gvUpdate.Rows[rowIndex].FindControl("txtUpdateFirstName");
            string first = tBox.Text;

            tBox = (TextBox)gvUpdate.Rows[rowIndex].FindControl("txtUpdateLastName");
            string last = tBox.Text;

            tBox = (TextBox)gvUpdate.Rows[rowIndex].FindControl("txtUpdateCvv");
            int cvv = int.Parse(tBox.Text);

            ddlUpdate = (DropDownList)gvUpdate.Rows[rowIndex].FindControl("ddlUpdateMax");
            int max = int.Parse(ddlUpdate.SelectedValue);

            gvUpdate.EditIndex = -1;

            CreditSvc.CreditCardObjects credit = null;

            credit                    = new CreditSvc.CreditCardObjects();
            credit.cardNumber         = cardNumber;
            credit.first              = first;
            credit.last               = last;
            credit.code               = cvv;
            credit.availamountBalance = max;
            credit.amountOwed         = owed;

            lblError.Visible = true;
            if (pxy.UpdateCreditCardInfor(credit, "12345"))
            {
                lblError.Text = "Credit Card Account Created";

                gvUpdate.DataSource = myDataSet;
                gvUpdate.DataBind();
            }
            else
            {
                lblError.Text = "Credit Card Account Not Created";
            }
        }
Exemplo n.º 7
0
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            CreditSvc.CreditCardObjects credit = null;

            credit                    = new CreditSvc.CreditCardObjects();
            credit.first              = txtNewFirstName.Text;
            credit.last               = txtNewLastName.Text;
            credit.cardNumber         = int.Parse(txtCreditNumber.Text);
            credit.code               = int.Parse(txtNewCvv.Text);
            credit.availamountBalance = float.Parse(ddlMaxBalance.SelectedValue);
            credit.amountOwed         = 0;
            lblError.Visible          = true;
            if (pxy.AddCreditCard(credit, "1234"))
            {
                lblError.Text = "Credit Card Account Created";
            }
            else
            {
                lblError.Text = "Credit Card Account Not Created";
            }
        }
Exemplo n.º 8
0
        protected void btnSubmitTransaction_Click(object sender, EventArgs e)
        {
            CreditSvc.CreditCardTransactions credit = null;

            credit = new CreditSvc.CreditCardTransactions();
            credit.PDescription  = txtNewProductName.Text;
            credit.pPrice        = float.Parse(txtNewProductPrice.Text);
            credit.CreditZipCode = int.Parse(txtNewZipCode.Text);
            credit.CreditState   = txtNewState.Text;
            credit.CreditAddress = txtNewState.Text;
            credit.CreditCity    = txtNewCity.Text;

            CreditSvc.CreditCardObjects CreditCard = null;

            CreditCard            = new CreditSvc.CreditCardObjects();
            CreditCard.cardNumber = int.Parse(txtTransactionCardNumber.Text);
            CreditCard.code       = int.Parse(txtTransactionCvv.Text);
            CreditCard.first      = txtTransactionFirstName.Text;
            CreditCard.last       = txtTransactionLastName.Text;
            CreditCard.date       = txtTransactionExDate.Text;

            if (pxy.CompareCardTransaction(CreditCard))
            {
                lblError.Visible = true;

                if (pxy.AddNewTransactions(credit))
                {
                    lblError.Text = "Transaction Approved";
                }
                else
                {
                    lblError.Text = "Transaction Not Approved";
                }
            }
            else
            {
                lblError.Visible = true;
                lblError.Text    = "Credit Card information was incorrect";
            }
        }
Exemplo n.º 9
0
 /// <remarks/>
 public void CompareCardTransactionAsync(CreditCardObjects credit)
 {
     this.CompareCardTransactionAsync(credit, null);
 }
Exemplo n.º 10
0
 /// <remarks/>
 public void UpdateCreditCardInforAsync(CreditCardObjects credit, string password)
 {
     this.UpdateCreditCardInforAsync(credit, password, null);
 }
Exemplo n.º 11
0
 /// <remarks/>
 public void AddCreditCardAsync(CreditCardObjects credit, string password)
 {
     this.AddCreditCardAsync(credit, password, null);
 }