Пример #1
0
        public int Update(FINCard card)
        {
            _sb = new StringBuilder();
            _sb.Append(@"UPDATE FINCards
                                       SET
                                          Memo = @Memo
                                          ,UserId=@UserId                                 
                                          ,ActivatedDay = @ActivatedDay
                                          ,Status = @Status
                                          ,StatusDay = @StatusDay
                                          ,Password = @Password
                                          ,CardConfigId = @CardConfigId
                                          ,EndDay = @EndDay
                                          ,FailTimes = @FailTimes
                                          ,LockedEndTime = @LockedEndTime");
            _sb.Append($" where Id=@Id");
            var parmlist = TableToModel <FINCard> .FillDbParams(card, DbConfig.DbProviderType.SqlServer);

            _dbfunc.ConnectionString = connstr;
            return(_dbfunc.ExecuteNonQuery(_sb.ToString(), parmlist.ToArray()));
        }