private void save_Click(object sender, EventArgs e) { if ((k == 1)) { test(); if ((t1.Text != "") && (t2.Text != "") && (t3.Text != "") && (t4.Text != "")) { int i = conn.autoinc("personal", "id_personal"); string ch1 = "insert into personal values('" + i + "','" + t1.Text + "','" + t2.Text + "','" + t3.Text + "','" + t4.Value.ToString("dd/MM/yyyy") + "','" + t5.Text + "','" + type.Text + "','" + country.Text + "','" + zip.Text + "','" + city.Text + "')"; conn.insertTable(ch1); Personal1 a = new Personal1(); a.Show(); this.Hide(); } else { //pictureBox1.Image = MCM.Properties. } } else { string req = "update personal set FAMILY_NAME ='" + t2.Text + "', FIRST_NAMES= '" + t3.Text + "',MAT='" + t1.Text + "',DATE_OF_BIRTH='" + t4.Value.ToString("dd/MM/yyyy") + "',EMAIL='" + t5.Text + "',TYPE_Per='" + type.Text + "',COUNTRY='" + country.Text + "',CITY='" + city.Text + "',ZIP='" + zip.Text + "' where id_personal = '" + id + "'"; conn.insertTable(req); Personal1 a = new Personal1(); a.Show(); this.Hide(); } }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Personal1 a = new Personal1(); a.Show(); }