private void btnluu_Click(object sender, EventArgs e) { db_HoaDon hd = new db_HoaDon { MaHD = txtmhd.Text, MaKH = int.Parse(cmbtkh.SelectedValue.ToString()), MaNV = 1, NgayBan = dtpnd.Value }; db.db_HoaDons.InsertOnSubmit(hd); db.SubmitChanges(); lblmhd.Text = txtmhd.Text; }
private void detach_db_HoaDons(db_HoaDon entity) { this.SendPropertyChanging(); entity.db_KhachHang = null; }
partial void Deletedb_HoaDon(db_HoaDon instance);
partial void Updatedb_HoaDon(db_HoaDon instance);
partial void Insertdb_HoaDon(db_HoaDon instance);
private void attach_db_HoaDons(db_HoaDon entity) { this.SendPropertyChanging(); entity.db_User = this; }