Beispiel #1
0
        private void delete()
        {
            String id = T_Num.Text;
            int    an = Convert.ToInt32(T_An.Text);

            payement = hotelEntities.Payement.Where(c => c.Payaement_id == id && c.An == an).First();
            hotelEntities.Payement.Remove(payement);
            hotelEntities.SaveChanges();
        }
Beispiel #2
0
 private void Frm_Payement_Load(object sender, EventArgs e)
 {
     hotelEntities = new HotelEntities();
     payement      = new Payement();
     T_Num.Focus();
     T_An.Text = DateTime.Now.Year.ToString();;
     this.data = new BindingList <string>();
     this.data.Add("Espece");
     this.data.Add("Cheque");
     this.data.Add("Credit Cart");
     T_PatType.DataSource = this.data;
     T_PatType.Text       = "Espece";
 }