Пример #1
0
        protected void btnAddNew_Click(object sender, EventArgs e)
        {
            if (txtCode.Text != empCode)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('Please enter the correct employee code');</script>");
                return;
            }

            if (inpputVal() == false)
            {
                return;
            }
            CreditCardServiceRef.TheWebService pxy = new CreditCardServiceRef.TheWebService();
            CreditCardServiceRef.CreditCardClass creditCard = new CreditCardServiceRef.CreditCardClass();
            CreditCardServiceRef.CustomerClass arthur = new CreditCardServiceRef.CustomerClass();
            DateTime dt = DateTime.Now;
            //Account Number generated uniquely each time using the date time stuff in c# to make a new 10 digit number each time a new card is added
            string accNum = dt.Month.ToString() + dt.Day.ToString() + dt.ToString("yy") + dt.Hour.ToString() + dt.Minute.ToString();
            creditCard.AccountNumber = float.Parse(accNum);
            creditCard.CVV = int.Parse(txtCVV.Text);
            creditCard.CardNumber = int.Parse(txtCCNum.Text);
            creditCard.CreditLimit = float.Parse(txtLimit.Text);
            creditCard.AccountBalance = float.Parse(txtAccBal.Text);
            arthur.Firstname = txtFName.Text;
            arthur.LastName = txtLName.Text;
            pxy.HelloWorld(creditCard, arthur);
        }
Пример #2
0
        protected void btnAddNew_Click(object sender, EventArgs e)
        {
            object[] stupid = new object[10];
            CreditCardServiceRef.TheWebService pxy = new CreditCardServiceRef.TheWebService();
            CreditCardServiceRef.CreditCardClass creditCard = new CreditCardServiceRef.CreditCardClass();
            CreditCardServiceRef.CustomerClass fred = new CreditCardServiceRef.CustomerClass();
            fred.Firstname = txtFName.Text;
            fred.LastName = txtLName.Text;
            fred.Address = txtAddress.Text;
            fred.City = txtCity.Text;
            fred.State = TextState.Text;
            fred.ZipCode = TxtZip.Text;
            creditCard.CreditLimit = pxy.GetCreditLimit(fred.Firstname);
            creditCard.AccountBalance = creditCard.CreditLimit - float.Parse(TxtTransAmnt.Text);
            creditCard.CardNumber = int.Parse(txtCCNum.Text);
            creditCard.CVV = int.Parse(txtCVV.Text);
            stupid[0] = creditCard.CardNumber;
            stupid[1] = creditCard.CVV;
            stupid[2] = float.Parse(TxtTransAmnt.Text);
            stupid[3] = fred.Firstname;
            string[] blah = pxy.UpdateCustomer(fred, creditCard, stupid);

            txtErrors.Text = blah[2];
        }
Пример #3
0
 /// <remarks/>
 public void HelloWorldAsync(CreditCardClass cc, CustomerClass arthur) {
     this.HelloWorldAsync(cc, arthur, null);
 }
Пример #4
0
 public bool HelloWorld(CreditCardClass cc, CustomerClass arthur) {
     object[] results = this.Invoke("HelloWorld", new object[] {
                 cc,
                 arthur});
     return ((bool)(results[0]));
 }
Пример #5
0
 /// <remarks/>
 public void UpdateCustomerAsync(CustomerClass fred, CreditCardClass cc, object[] stupid, object userState) {
     if ((this.UpdateCustomerOperationCompleted == null)) {
         this.UpdateCustomerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateCustomerOperationCompleted);
     }
     this.InvokeAsync("UpdateCustomer", new object[] {
                 fred,
                 cc,
                 stupid}, this.UpdateCustomerOperationCompleted, userState);
 }
Пример #6
0
 /// <remarks/>
 public void UpdateCustomerAsync(CustomerClass fred, CreditCardClass cc, object[] stupid) {
     this.UpdateCustomerAsync(fred, cc, stupid, null);
 }
Пример #7
0
 public string[] UpdateCustomer(CustomerClass fred, CreditCardClass cc, object[] stupid) {
     object[] results = this.Invoke("UpdateCustomer", new object[] {
                 fred,
                 cc,
                 stupid});
     return ((string[])(results[0]));
 }
Пример #8
0
 /// <remarks/>
 public void HelloWorldAsync(CreditCardClass cc, CustomerClass arthur, object userState) {
     if ((this.HelloWorldOperationCompleted == null)) {
         this.HelloWorldOperationCompleted = new System.Threading.SendOrPostCallback(this.OnHelloWorldOperationCompleted);
     }
     this.InvokeAsync("HelloWorld", new object[] {
                 cc,
                 arthur}, this.HelloWorldOperationCompleted, userState);
 }