예제 #1
0
        public bool Update(string pNewPrefixIn, string pOldPrefixIn, DialPeerRow value)
        {
            if (pNewPrefixIn != pOldPrefixIn)
            {
                validate(value.End_point_id, pNewPrefixIn);
            }

            string _sqlStr = "UPDATE [dbo].[DialPeer] SET " +
                             "[" + DialPeerRow.customer_acct_id_DbName + "]=" + base.Database.CreateSqlParameterName(DialPeerRow.customer_acct_id_PropName) + "," +
                             "[" + DialPeerRow.prefix_in_DbName + "]=" + base.Database.CreateSqlParameterName("NewPrefix_in") +
                             " WHERE " +
                             "[" + DialPeerRow.end_point_id_DbName + "]=" + base.Database.CreateSqlParameterName(DialPeerRow.end_point_id_PropName) +
                             " AND " +
                             "[" + DialPeerRow.prefix_in_DbName + "]=" + base.Database.CreateSqlParameterName("OldPrefix_in");
            IDbCommand _cmd = Database.CreateCommand(_sqlStr);

            AddParameter(_cmd, DialPeerRow.customer_acct_id_PropName, value.Customer_acct_id);
            AddParameter(_cmd, DialPeerRow.end_point_id_PropName, value.End_point_id);
            base.Database.AddParameter(_cmd, "NewPrefix_in", DbType.AnsiString, pNewPrefixIn);
            base.Database.AddParameter(_cmd, "OldPrefix_in", DbType.AnsiString, pOldPrefixIn);
            return(0 != _cmd.ExecuteNonQuery());
        }
예제 #2
0
 public override void Insert(DialPeerRow value)
 {
     validate(value.End_point_id, value.Prefix_in);
     base.Insert(value);
 }
예제 #3
0
 public override bool Update(DialPeerRow value)
 {
     throw new NotSupportedException();
 }