public List<Bond> GetList() { var tBondTableAdapter = new t_bondTableAdapter(); var tBondDataTable = new BondDBDataSet.t_bondDataTable(); tBondTableAdapter.Fill(tBondDataTable); var dataRows = tBondDataTable.Select(); return GetBonds(dataRows); }
public List<Bond> GetBondBySerial(long serial) { var tBondTableAdapter = new t_bondTableAdapter(); var bondDataTable = tBondTableAdapter.GetDataBySerial(serial); if (bondDataTable.Rows.Count > 0) { return GetBonds(bondDataTable.Select()); } return null; }
public void UpdateBond(Bond bond) { var tBondTableAdapter = new t_bondTableAdapter(); var tBondDataTable = new BondDBDataSet.t_bondDataTable(); tBondTableAdapter.Fill(tBondDataTable); var tBondRow = tBondDataTable.FindByID(bond.Id); tBondRow.Owner = bond.Owner; tBondRow.Serial = bond.Serial; tBondRow.ModifiedDate = bond.ModifiedDate; tBondTableAdapter.Update(tBondRow); }
public void DeleteBond(long id) { var tBondTableAdapter = new t_bondTableAdapter(); tBondTableAdapter.Delete(id); }
public void AddBond(Bond bond) { var tBondTableAdapter = new t_bondTableAdapter(); tBondTableAdapter.Insert(bond.Serial, bond.Owner, bond.CreatedDate, bond.ModifiedDate); }