public int insertShipCar(ShipCar sc) { try { db.ShipCars.InsertOnSubmit(sc); db.SubmitChanges(); } catch { return -1; } return 1; }
public int updateShipCarForWeb(ShipCar sc) { try { ShipCar s = db.ShipCars.SingleOrDefault(n => n.id == sc.id); s.idnhanvien = sc.idnhanvien; db.SubmitChanges(); } catch { return -1; } return 1; }
partial void DeleteShipCar(ShipCar instance);
partial void UpdateShipCar(ShipCar instance);
partial void InsertShipCar(ShipCar instance);
private void detach_ShipCars(ShipCar entity) { this.SendPropertyChanging(); entity.NhanVien = null; }
private void attach_ShipCars(ShipCar entity) { this.SendPropertyChanging(); entity.NhanVien = this; }