Exemple #1
0
        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Manage_Clo vree = new Manage_Clo();

            this.Hide();
            vree.Show();
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Manage_Clo tru = new Manage_Clo();

            this.Hide();
            tru.Show();
        }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (updatesource.var != -1)
     {
         con.Open();
         string     query = "update clo  set Name = '" + textBox1.Text.ToString() + "' where Id = '" + updatesource.var + "'";
         SqlCommand cmd   = new SqlCommand(query, con);
         cmd.ExecuteNonQuery();
         con.Close();
         MessageBox.Show("Successfull");
     }
     else
     {
         con.Open();
         string     query = "INSERT INTO Clo(Name, DateCreated, DateUpdated) VALUES ('" + textBox1.Text.ToString() + "','" + DateTime.Now.ToString("MM/dd/yyyy hh:mm tt") + "','" + DateTime.Now.ToString("MM/dd/yyyy hh:mm tt") + "')";
         SqlCommand com   = new SqlCommand(query, con);
         com.ExecuteNonQuery();
         con.Close();
         MessageBox.Show("Successfull!");
         Manage_Clo gree = new Manage_Clo();
         this.Hide();
         gree.Show();
     }
 }