private void CustomerCompany_Load(object sender, EventArgs e) { if (label8.Text == "Manage Customer") { textBox1.Text = c.GetMax().Rows[0][0].ToString(); dataGridView1.AutoGenerateColumns = false; dataGridView1.DataSource = c.Get_All_Customer(); } else { textBox1.Text = c.maxcomp().Rows[0][0].ToString(); } }
public Customer() { InitializeComponent(); date.Text = Convert.ToString(DateTime.Now); txtid.Text = c.GetMax().Rows[0][0].ToString(); }