Exemple #1
0
        private void newToolStripButton_Click(object sender, EventArgs e)
        {
            Customer_Create cc = new Customer_Create();

            cc.Show();
            this.Hide();
        }
Exemple #2
0
 private void button2_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         Customer_Create cc = new Customer_Create();
         cc.Show();
     }
 }
Exemple #3
0
        private void saveToolStripButton_Click(object sender, EventArgs e)
        {
            if (isvalid())
            {
                con1.Open();
                SqlCommand com1 = new SqlCommand();
                com1.Connection  = con1;
                com1.CommandText = "Insert into Customer values ('" + textBox10.Text.Trim() + "','" + textBox2.Text.Trim() + "','" + textBox3.Text.Trim() + "','" + textBox5.Text.Trim() + "','" + textBox4.Text.Trim() + "','" + textBox6.Text.Trim() + "','" + textBox8.Text.Trim() + "','" + textBox7.Text.Trim() + "','" + textBox9.Text.Trim() + "','" + dateTimePicker1.Value + "','" + 0 + "')";
                SqlDataAdapter da = new SqlDataAdapter(com1.CommandText.Trim(), con1.ConnectionString);
                DataTable      dt = new DataTable();
                da.Fill(dt);
                MessageBox.Show("Successfully Saved");
                con1.Close();


                Customer_Create cc = new Customer_Create();
                this.Hide();
                cc.Show();
            }
        }
Exemple #4
0
        private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            if (e.KeyData == Keys.Enter)
            {
                if (isvalid())
                {
                    con1.Open();
                    SqlCommand com1 = new SqlCommand();
                    com1.Connection  = con1;
                    com1.CommandText = "Insert into Customer values ('" + textBox10.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox5.Text + "','" + textBox4.Text + "','" + textBox6.Text + "','" + textBox8.Text + "','" + textBox7.Text + "','" + textBox9.Text + "','" + dateTimePicker1.Value + "','" + 0 + "')";
                    SqlDataAdapter da = new SqlDataAdapter(com1.CommandText, con1.ConnectionString);
                    DataTable      dt = new DataTable();
                    da.Fill(dt);
                    MessageBox.Show("Successfully Saved");
                    con1.Close();

                    Customer_Create cc = new Customer_Create();
                    this.Hide();
                    cc.Show();
                }
            }
        }
Exemple #5
0
        private void button2_Click(object sender, EventArgs e)
        {
            Customer_Create cc = new Customer_Create();

            cc.Show();
        }
Exemple #6
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            Customer_Create cc = new Customer_Create();

            cc.Show();
        }
Exemple #7
0
        private void customerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Customer_Create cc = new Customer_Create();

            cc.Show();
        }