/// <summary> /// Deletes a BondForm record /// </summary> public static int Delete(BondFormDO DO) { SqlParameter _BondFormID = new SqlParameter("BondFormID", SqlDbType.VarChar); _BondFormID.Value = DO.BondFormID; SqlParameter[] _params = new SqlParameter[] { _BondFormID }; return DataCommon.ExecuteScalar("[dbo].[BondForm_Delete]", _params, "dbo"); }
/// <summary> /// Creates a new BondForm record /// </summary> public static void Create(BondFormDO DO) { SqlParameter _BondFormID = new SqlParameter("BondFormID", SqlDbType.VarChar); _BondFormID.Value = DO.BondFormID; SqlParameter[] _params = new SqlParameter[] { _BondFormID }; DataCommon.ExecuteNonQuery("[dbo].[BondForm_Insert]", _params, "dbo"); }
/// <summary> /// Gets all BondForm records /// </summary> public static BondFormDO[] GetAll() { SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[BondForm_GetAll]", new SqlParameter[] { }, "dbo"); List<BondFormDO> objs = new List<BondFormDO>(); while(sr.Read()){ BondFormDO obj = new BondFormDO(); obj.BondFormID = sr.GetString(sr.GetOrdinal("BondFormID")); objs.Add(obj); } return objs.ToArray(); }
/// <summary> /// Selects BondForm records by PK /// </summary> public static BondFormDO[] GetByPK(String BondFormID) { SqlParameter _BondFormID = new SqlParameter("BondFormID", SqlDbType.VarChar); _BondFormID.Value = BondFormID; SqlParameter[] _params = new SqlParameter[] { _BondFormID }; SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[BondForm_GetByPK]", _params, "dbo"); List<BondFormDO> objs = new List<BondFormDO>(); while(sr.Read()) { BondFormDO obj = new BondFormDO(); obj.BondFormID = sr.GetString(sr.GetOrdinal("BondFormID")); objs.Add(obj); } return objs.ToArray(); }