コード例 #1
0
ファイル: Main.cs プロジェクト: Thenmee/Store_system
        private void companyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BL.clscustomercompany c = new BL.clscustomercompany();

            CustomerCompany f = new CustomerCompany();

            f.label8.Text = "Manage Company";
            f.dataGridView1.DataSource          = c.Get_All_Company();
            f.dataGridView1.AutoGenerateColumns = false;
            f.Show();
        }
コード例 #2
0
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "")
     {
         MessageBox.Show("You Cant do anything if the boxes are empty  ", "Warning  ", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         if (label8.Text == "Manage Customer")
         {
             c.AddCustomer(Convert.ToInt32(textBox1.Text), textBox2.Text, textBox4.Text, textBox3.Text, Convert.ToInt32("2"));
             MessageBox.Show("Add Seccess", "Add Product ", MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.dataGridView1.DataSource = c.Get_All_Customer();
         }
         else
         {
             c.AddCustomer(Convert.ToInt32(textBox1.Text), textBox2.Text, textBox4.Text, textBox3.Text, Convert.ToInt32("1"));
             MessageBox.Show("Add Seccess", "Add Product ", MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.dataGridView1.DataSource = c.Get_All_Company();
         }
     }
 }