Example #1
0
    public static void AjouterGaz(T_FactureGaz newfac)
    {
        DepenseBDDataContext bd = new DepenseBDDataContext();

        bd.T_FactureGaz.InsertOnSubmit(newfac);
        bd.SubmitChanges();
        bd.Dispose();
    }
Example #2
0
 protected void btn_appliquer_Click(object sender, EventArgs e)
 {
     if (tbx_litre.Text != "" && tbx_nbKilo.Text != "" && tbx_cout.Text != "" && tbx_calender.Text != null)
     {
         T_FactureGaz newfac = new T_FactureGaz();
         newfac.nbKilo = float.Parse(tbx_nbKilo.Text);
         newfac.litre  = float.Parse(tbx_litre.Text);
         newfac.cout   = decimal.Parse(tbx_cout.Text);
         newfac.ddate  = DateTime.Parse(tbx_calender.Text);
         newfac.idCo   = int.Parse(Session["idCo"].ToString());
         CoBD.AjouterGaz(newfac);
         Response.Redirect("Acceuil.aspx");
     }
 }
 partial void DeleteT_FactureGaz(T_FactureGaz instance);
 partial void UpdateT_FactureGaz(T_FactureGaz instance);
 partial void InsertT_FactureGaz(T_FactureGaz instance);
 private void detach_T_FactureGaz(T_FactureGaz entity)
 {
     this.SendPropertyChanging();
     entity.T_Connexion = null;
 }