protected void getAccount() { //create an instance of our Account class BusinessRules.CAccount objAccount = new BusinessRules.CAccount(); //pass the id from the url to the Account class objAccount.Customer_id = Convert.ToInt32(Request.QueryString["customer_id"]); //call the getAccount method of our class objAccount.getAccounts(); }
protected void bttSubmit_Click(object sender, EventArgs e) { //create an instance of our Account class BusinessRules.CAccount objAccount = new BusinessRules.CAccount(); //pass the information entered into the page into the CAccount.CS page objAccount.AccountNumber = Convert.ToDecimal(txtAccountNumber.Text); objAccount.InstallDate = (ddlMonth.SelectedValue.ToString() +"/"+ ddlDay.SelectedValue.ToString() + "/" + ddlYear.SelectedValue.ToString()); objAccount.FirstName = txtFirstName.Text; objAccount.LastName = txtLastName.Text; objAccount.CustomerPhoneNumber = txtPhoneNumber.Text; objAccount.FirstReceiver = txtFirstReceiver.Text; objAccount.SecondReceiver = txtSecondReceiver.Text; objAccount.ThirdReceiver = txtThirdReceiver.Text; objAccount.FourthReceiver = txtFourthReceiver.Text; objAccount.InstallerName = txtInstallerName.Text; objAccount.ClaimAmount = Convert.ToDecimal(txtClaimAmount.Text); objAccount.Customer_id = Convert.ToInt32(Request.QueryString["customer_id"]); // process the saved operation objAccount.saveAccount(); //redirect to the update page Response.Redirect("viewDatabase.aspx", false); }