public bool insertTonKho(string msp, DateTime ngay, int sl) { try { tonkho tk = new tonkho(); tk.masp = msp; tk.ngaycapnhat = ngay; tk.soluongton = sl; db.tonkhos.InsertOnSubmit(tk); db.SubmitChanges(); return true; } catch { return false; } }
partial void Deletetonkho(tonkho instance);
partial void Updatetonkho(tonkho instance);
partial void Inserttonkho(tonkho instance);
private void detach_tonkhos(tonkho entity) { this.SendPropertyChanging(); entity.sanpham = null; }
private void attach_tonkhos(tonkho entity) { this.SendPropertyChanging(); entity.sanpham = this; }