1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
.
.
protected void btn_enregistrer_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("server=localhost;database=MSD_SI_ORMVA_SM;user id=user_ormva;password=1234");
con.Open();
string sql = " INSERT INTO t_03_activites (id_pjt_01,intitule_activite, id_respo_05, date_debut_activite, date_fin_activite, qte, pu) VALUES (" + cbx_pjts.Value + ",'" + txt_activite.Value + "','" + cbx_repspo.Value + "','" + Convert.ToDateTime(cbx_d_debut.Value).ToString("yyyy/MM/dd") + "','" + Convert.ToDateTime(cbx_d_fin.Value).ToString("yyyy/MM/dd") + "'," + txt_qte.Value + "," + txt_pu.Value + ")";
SqlCommand cmd = new SqlCommand(sql, con);
cmd.ExecuteNonQuery();
con.Close();
GV_ACTIVS.DataBind();
//btn_enregistrer.Enabled = false;
}
.
. |
Partager