private void DisplayAllaccount_Load(object sender, EventArgs e) { CustomerGateway gateway = new CustomerGateway(); List <Customer> customers = gateway.GetaccountDetails(); dataGridView1.DataSource = customers; }
private void button1_Click(object sender, EventArgs e) { Customer customer = new Customer(); customer.accountno = accnoTextBox.Text; customer.name = nameTextBox.Text; customer.address = addressTextBox.Text; customer.phonenumber = phnoTextBox.Text; customer.sex = sexTextBox.Text; customer.occupation = occupationTextBox.Text; customer.annualincome = annincomeTextBox.Text; customer.accountstatement = accstateTextBox.Text; CustomerGateway gateway=new CustomerGateway(); int i = CustomerGateway.Save(customer); }
private void button1_Click(object sender, EventArgs e) { Customer customer = new Customer(); customer.accountno = accnoTextBox.Text; customer.name = nameTextBox.Text; customer.address = addressTextBox.Text; customer.phonenumber = phnoTextBox.Text; customer.sex = sexTextBox.Text; customer.occupation = occupationTextBox.Text; customer.annualincome = annincomeTextBox.Text; customer.accountstatement = accstateTextBox.Text; CustomerGateway gateway = new CustomerGateway(); int i = CustomerGateway.Save(customer); }
private void DisplayAllaccount_Load(object sender, EventArgs e) { CustomerGateway gateway=new CustomerGateway(); List<Customer> customers = gateway.GetaccountDetails(); dataGridView1.DataSource = customers; }