Exemple #1
0
 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);
 }
Exemple #2
0
 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;
 }
Exemple #3
0
 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);
 }
Exemple #4
0
 public void DeleteBond(long id)
 {
     var tBondTableAdapter = new t_bondTableAdapter();
     tBondTableAdapter.Delete(id);
 }
Exemple #5
0
 public void AddBond(Bond bond)
 {
     var tBondTableAdapter = new t_bondTableAdapter();
     tBondTableAdapter.Insert(bond.Serial, bond.Owner, bond.CreatedDate, bond.ModifiedDate);
 }