Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Windows.Forms;
- using ProjetDOTNET.Models;
- namespace ProjetDOTNET.Views.Compte
- {
- public partial class Ajoutcompte : Form
- {
- List<Models.Client> tabclient = new List<Models.Client>();
- public Ajoutcompte()
- {
- InitializeComponent();
- }
- private void Ajoutcompte_Load(object sender, EventArgs e)
- {
- //NEED TO GET DATA TO TABCLIENT HERE
- DataTable table = new DataTable();
- table.Columns.Add("ID", typeof(int));
- table.Columns.Add("Nom Et Prenom", typeof(string));
- table.Columns.Add("Numero Compte", typeof(string));
- table.Rows.Add(1, "AAAA", "zzzzz");
- table.Rows.Add(2, "BBBB", "BBBB");
- table.Rows.Add(3, "CCCC", "CCCC");
- dataGridView1.DataSource = table;
- }
- private void label1_Click(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string numcompte = textBox1.Text;
- string rib = textBox2.Text;
- string type = (radioButton1.Checked) ? "Courant" : "Epargne";
- Client c = tabclient[dataGridView1.SelectedRows[0].Index];
- Models.Compte compte = new Models.Compte(numcompte, type, rib, 0, c);
- //need to save compte here
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement